• I’m using the Divi theme that doesn’t have any template parts and shows search results in the index.php, same as the archives and category/tag search.

    I need the search results show in a custom template, say, search-results.php. I already created this template, but i don’t know how to make the search results show on this page.

Viewing 1 replies (of 1 total)
  • Try naming the template ‘search.php’ .

    This link may be helpful: https://developer.www.ads-software.com/themes/basics/template-hierarchy/ . Part way down the page is the section, Visual Overview. Click on the image to enlarge it. It explains how WordPress looks for certain templates for displaying results, in what order. At the bottom left, see that it looks for a template, search.php, for displaying search results.

    Standard WP themes include a search.php.

    • This reply was modified 8 years, 2 months ago by lectest1.
Viewing 1 replies (of 1 total)
  • The topic ‘Custom template for search results’ is closed to new replies.