[Resolved] content-search

Home Forums Support [Resolved] content-search

Home Forums Support content-search

  • This topic has 5 replies, 2 voices, and was last updated 1 year ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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,
    Dan

    #1464489
    Tom
    Lead Developer
    Lead Developer

    Hi 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.

    #1464507
    Dan

    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
    Dan

    #1465667
    Tom
    Lead Developer
    Lead Developer

    Not too sure what you mean – do they offer their own pagination?

    #1471552
    Dan

    Hi Tom, thanks for your reply.
    They have just introduced pagination, so I am marking this as resolved.

    Thanks
    Dan

    #1471990
    Tom
    Lead Developer
    Lead Developer
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.