WordPress.org

Ready to get started?Download WordPress

Forums

WP Query Search Filter
[resolved] search results shows the full post (6 posts)

  1. queeneve
    Member
    Posted 1 year ago #

    Plugin is working fine but the search results shows the full post not a summary or the first lines only and this makes the content page very long and affecting the design of the site

    is there a way that I can make only the first few lines or the short description or the excerpts appear instead of the whole post???

    http://wordpress.org/extend/plugins/wp-query-search-filter/

  2. TC.K
    Member
    Plugin Author

    Posted 1 year ago #

    I think it has to do with your theme's search.php. Do you use <?php the_excerpt(); ?> for the search result?

  3. queeneve
    Member
    Posted 1 year ago #

    actually I dont know about this , how can I know it???

  4. queeneve
    Member
    Posted 1 year ago #

    I searched for this code in the search file but i cannot find it

  5. TC.K
    Member
    Plugin Author

    Posted 1 year ago #

    @queeneve,
    It really depends on how your theme handle the search result. Some theme might use get_template_part() to show the result.

    You can try using other theme, eg. the default tewntyeleven theme it use get_template_part() to get the search content from the content.php file. Inside content.php file, you will see

    <?php if ( is_search() ) : // Only display Excerpts for Search ?>
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    		</div><!-- .entry-summary -->

    Just for your reference. Hope this help.

  6. queeneve
    Member
    Posted 1 year ago #

    Thanks for your reply , I found an option in the theme settings to use either the whole content or the excerpts

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.