WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Short search results (3 posts)

  1. yarongo
    Member
    Posted 4 years ago #

    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?

  2. keesiemeijer
    moderator
    Posted 4 years ago #

    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>
    `

  3. yarongo
    Member
    Posted 4 years ago #

    Thanks, It works!!!

Topic Closed

This topic has been closed to new replies.

About this Topic