Support » Fixing WordPress » Short search results

  • Resolved yarongo

    (@yarongo)


    How can I make the search results page to show me only results with the title and the few lines that has the search phrase, and not the 54 full text posts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    moderator

    Put this before the loop in your search.php
    <?php query_posts('posts_per_page=10'); ?>
    and change this <?php the_content(); ?> to <?php the_excerpt(); ?> if you want an excerpt.
    if you want the search phrase use this <p>You searched for " <?php the_search_query() ?> ". Here are the results:</p>
    `

    Thanks, It works!!!

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