- This topic has 5 replies, 2 voices, and was last updated 4 months, 4 weeks ago by
Tom.
-
AuthorPosts
-
September 29, 2020 at 8:53 am #1464066
Dan
Hi
I understand that in order to customize the search results page I will copy over content.php to child theme and rename it to content-search.php and do my modifications.
But, where can I access the top part of the page with the # of results, the search form and the bottom pagination. Where is it all constructed?<div class="entry-content" itemprop="text"> <div class="searchwp-search-form searchwp-supplemental-search-form"> <form role="search" method="get" id="searchform" class="searchform" action="/~sloveniangenealo/voice-of-youth-search/"> <div> <label class="screen-reader-text" for="swpquery">Search for:</label> <input type="text" placeholder="Search" value="voice" name="swpquery" id="swpquery"> <input type="hidden" name="engine" value="voice_of_youth_search"> <input type="submit" id="searchsubmit" value="Find Results"></div> </form> </div> <div class="search-results-wrapper"> Total Results: 25
Bottom of page:
<nav id="nav-below" class="paging-navigation"> <span class="screen-reader-text">Post navigation</span> <div class="nav-previous"> <span class="prev" title="Previous"><a href="http://r4.temporary-access.com/~sloveniangenealo/page/2/?s=tree">Older posts</a></span> </div> <div class="nav-links"><span aria-current="page" class="page-numbers current">1</span> <a class="page-numbers" href="http://r4.temporary-access.com/~sloveniangenealo/page/2/?s=tree">2</a> <span class="page-numbers dots">…</span> <a class="page-numbers" href="http://r4.temporary-access.com/~sloveniangenealo/page/8/?s=tree">8</a> <a class="next page-numbers" href="http://r4.temporary-access.com/~sloveniangenealo/page/2/?s=tree">Next →</a></div> </nav>
Thanks,
DanSeptember 29, 2020 at 3:32 pm #1464489Tom
Lead DeveloperLead DeveloperHi there,
The search results template in GeneratePress uses the standard
content.php
file to display the results.The markup you referenced seems to be coming from SearchWP.
content-search.php
is the correct filename if you want to use a custom loop for the search results in your search template.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 29, 2020 at 3:58 pm #1464507Dan
Hi Tom,
you are correct, it’s the SearchWP shortcode creating that markup.
Would you have any clue how to enable pagination while using their shortcode instead of the ‘next’, ‘prev’ links?Thanks
DanSeptember 30, 2020 at 9:48 am #1465667Tom
Lead DeveloperLead DeveloperNot too sure what you mean – do they offer their own pagination?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 4, 2020 at 7:07 am #1471552Dan
Hi Tom, thanks for your reply.
They have just introduced pagination, so I am marking this as resolved.Thanks
DanOctober 4, 2020 at 10:59 am #1471990Tom
Lead DeveloperLead DeveloperAwesome 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.