WordPress.org

Ready to get started?Download WordPress

Forums

Preview text in search results? (3 posts)

  1. urbanor
    Member
    Posted 8 years ago #

    Hello all,

    I'm new to wordpress and also PHP. I've seen this before but not sure how to reproduce it. On the search results page I'd like to have a preview of the post text, maybe the first 200 characters.

    Anyone know how to do this in wordpress? Thanks in advance!

  2. moshu
    Member
    Posted 8 years ago #

    Use a search.php template file in your theme and put the_excerpt in it.
    Template_Tags/the_excerpt
    Template_Hierarchy#Search_Result_Page
    Theme_Development#Theme_Template_Files_List

  3. urbanor
    Member
    Posted 8 years ago #

    perfect THANK YOU!

Topic Closed

This topic has been closed to new replies.

About this Topic