Forum Replies Created
-
AuthorPosts
-
melsaunders
ParticipantThanks a lot for your help!
I’d like to create my own custom grid and cards to display the search results. Is there any documentation or guidance on how to hook into the results and output them in my own layout? Appreciate it!melsaunders
ParticipantPerfect, Thank you so much
melsaunders
ParticipantThanks so much for the feedback! Glad the solution works. I really appreciate your help!
If anything else comes up, I’ll be sure to reach out. Thanks again!
melsaunders
ParticipantThank you for the solution provided regarding limiting the number of results; I’ll give it a try!
As for adding a link to the archive page for each post type at the end of its group, I experimented with the following code in the group-footer.php file, and it seems to be working fine:
<span> <?php $post_type = get_post_type($r->id); if ($post_type === 'products') { // If the post type is 'products', add a link to the products archive page echo '<a href="' . home_url('/products') . '">See All Products</a>'; } elseif ($post_type === 'post') { // If the post type is 'post', add a link to the articles archive page echo '<a href="' . home_url('/resources') . '">See All Articles</a>'; } else { // Otherwise, just display the post type echo esc_html($post_type); } ?> </span>It seems to do the trick for now. Let me know if there’s anything I should be cautious about with this approach!
melsaunders
ParticipantYes, I tried the solution you suggested, and it works well! Thank you for that.
I’d like to refine it further:
Is it possible to add a link to the archive page for each post type at the end of its group?
Can I reduce the number of results displayed for each group?melsaunders
ParticipantHello,
Thank you for your response! I understand that combining groupings isn’t natively possible. However, I was wondering if this could be achieved with custom code, such as by editing the result templates or using filters/hooks?
melsaunders
ParticipantYes, got it. So I’m missing an older license from Code Canyon, which I can import. I might be back in touch as I think I’d like to take up the offer of 5 sites / lifetime, but I’ll do that once we know it’s working with the Grid Builder
Thanks !
melsaunders
ParticipantYou cannot access this content.
melsaunders
ParticipantYou cannot access this content.
melsaunders
ParticipantYou cannot access this content.
melsaunders
ParticipantYou cannot access this content.
melsaunders
ParticipantYou cannot access this content.
-
AuthorPosts