- This topic has 9 replies, 3 voices, and was last updated 1 year, 7 months ago by Tom.
December 8, 2019 at 3:14 am #1097626Samuel
I looked around the forum but didn’t found what i needed, except maybe the idea that it couldn’t be possible but I’m asking to be sure.
I’m using a grid plugin to display all my archives pages, to do so i used your PHP function to use page instead of category and tag archives. The design is simple, items are displaying with a square image and title inside the image with overlay effect.
The only page i can’t customize like this is the search result page… is there a way to hook it like my category and tag archives ? Or any possibility to use my grid plugin inside Search page ? Or any other idea ?
Thanks a lot,
SamuelDecember 8, 2019 at 9:07 am #1097906LeoStaffCustomer SupportDecember 8, 2019 at 9:46 am #1097940Samuel
As I’m working local it’s not as simple as that but I can run a test website if you need it ? The plugin I’m using is WP Grid Builder by Themeone : https://wpgridbuilder.comDecember 8, 2019 at 10:24 am #1097966LeoStaffCustomer SupportDecember 9, 2019 at 6:32 am #1098586Samuel
Ok, so I resolved this with
<?php echo do_shortcode( '[wpgb_grid id="1" is_main_query="true"]' );
To replace the main loop in search.php :
<?php while ( have_posts() ) : the_post(); get_template_part( 'content', 'search' ); endwhile;
By the way I have other problem regarding header of the search page. Using element I’m not able to do anything, nothing is changing in the header… display rules is on “search result”… do I miss something ?
Even this https://generatepress.com/forums/topic/page-header-on-search-page/#post-1056795 is not working.
Thanks for your help !December 9, 2019 at 7:46 pm #1099383TomLead DeveloperLead Developer
So when you create a new Element and set the Display Rules to your search results, nothing shows up at all?
Let me know 🙂December 10, 2019 at 7:11 am #1099926Samuel
This is exactly itDecember 10, 2019 at 5:31 pm #1100443TomLead DeveloperLead Developer
Can you show me a screenshot of your hook content and your Display Rules, and then link me to the search results page?
Thanks!December 11, 2019 at 9:11 am #1101229Samuel
I’m working on local server so I can’t send you the search result page, and I don’t know how to upload image here… but my Display Rule is “Location : Search Result”, and my hook content is adding <h1>[search-title]</h1> shortcode to display title in header (for now it’s displaying under header), also I tried to put a “section image : custom image”, etc. etc.
If you need access, I think I’ll publish my website soon and I’ll hide header with css. When online I’ll send you a link.December 11, 2019 at 6:57 pm #1101634
- You must be logged in to reply to this topic.