[resolved] Search results only displays full post (3 posts)

  1. R_Hemingway
    Posted 2 years ago #

    Hi all,

    I'm having an issue where my search results are only displaying a 'full post'.

    This would be ok but unfortunately I'm using a table plugin to create sortable jquery tables on some pages & posts, and when displaying results it strips out all the formatting and making it look terrible

    See my test site for example.

    Under settings I have checked the box for excerpts, but no joy!

    Any help much appreciated!

  2. Anthony Hortin
    Theme Author

    Posted 2 years ago #

    You have two options here. The first option is to simply insert a ‘More tag’ into your content by clicking the ‘Insert More Tag’ button on the Editor Toolbar. When you insert a “More” tag into your Post/Page, everything prior to the tag is considered as a ‘teaser’ and so you wont get the full content displaying.

    Alternatively, override the content.php file in your child theme by making a copy of this file and then changing the section that displays the search results. Instead of using the_content(), change this to use the_excerpt().

  3. R_Hemingway
    Posted 2 years ago #

    Got it!

    The comment on the 1st line confused me:

    <?php if ( is_search() ) { // Only display Excerpts for Search ?>

    But i've swapped out the_content for the_excerpt and it's fine now.

    Didn't want to use the 'more' tag because I am using custom excerpts.

    Thanks for your help!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.