• Resolved twelve_o_clock

    (@twelve_o_clock)


    I used the get_search_form function to create a search box in a WordPress site. However, the search results display the entire contents of the pages that match the search. Is there a way to customize the search results page? When I try searching for a way to customize the search, I get ways of customizing the search form and not the search results page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter twelve_o_clock

    (@twelve_o_clock)

    I found out that to create a custom search page, I use a page in the theme called search.php. However, I want it to be able to display just part of the text of a page (preferably the part that contains the keywords being searched for). I was able to use <?php the_content(‘Rest’); ?> to display the page content, but that displays the entire page, including images.

    Thread Starter twelve_o_clock

    (@twelve_o_clock)

    I found the solution: <?php the_excerpt(); ?>.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customize search results page’ is closed to new replies.