- This topic has 9 replies, 3 voices, and was last updated 4 years, 9 months ago by Tom.
-
AuthorPosts
-
December 8, 2019 at 3:14 am #1097626Samuel
Hi,
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 SupportHi there,
Any chance you can link us to the site in question?
You can edit the original topic and use the private URL field.
Let me know ๐
December 8, 2019 at 9:46 am #1097940SamuelAs 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.com
December 8, 2019 at 10:24 am #1097966LeoStaffCustomer SupportHmm I believe you’d need to ask the plugin support to see if it can be used in the search result page.
December 9, 2019 at 6:32 am #1098586SamuelOk, 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 DeveloperHi there,
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 #1099926SamuelHi,
This is exactly it
December 10, 2019 at 5:31 pm #1100443TomLead DeveloperLead DeveloperCan 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 #1101229SamuelI’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 #1101634TomLead DeveloperLead DeveloperA link would definitely be helpful. Which hook is the Element added to?
-
AuthorPosts
- You must be logged in to reply to this topic.