WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
[resolved] Custom excerpts/snippets (7 posts)

  1. lfaber
    Member
    Posted 1 year ago #

    I have "Custom excerpts/snippets" enabled. It works fine for the first 2 results. Then I get flooded with content - only because Relevansi is so darned efficient! I'd like to only display excerpts/snippets in my search results. Is this possible?

    I love thsi plugin - BTW!

    http://wordpress.org/extend/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

    If your search results template is set to only display excerpts, then it will only display excerpts. So, it's all up to your search results template.

  3. karenelated
    Member
    Posted 1 year ago #

    Hello Mikko

    I can't get any snippets to show. It's probably because I haven't set up the breakdown format right? I've simply added your examples '%title%, %body%, %tags%'

    Thanks!
    http://elated.co.za

  4. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

    The breakdown format is not necessary. You need to enable the snippets and have excerpts shown on your search results page.

    Does the breakdown appear? If not, then the problem is that your site is skipping Relevanssi completely. See most important Relevanssi debugging trick.

  5. karenelated
    Member
    Posted 1 year ago #

    Hello Mikko
    Thanks, but query_posts() doesn't appear in the search.php
    This is the code I have:

    ' <?php if (have_posts()) : ?>

    <ul id="archive">
    <?php while (have_posts()) : the_post(); ?>'

    But I'm confused if I take out have_posts() doesn't that mean we are not asking for results?

  6. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

    You need to have the have_posts() in the search results page.

    Please answer the following questions:
    - Do the breakdowns appear in the search results if you enable them?
    - Does your search results page use the_content() or the_excerpt() to show the results?

  7. karenelated
    Member
    Posted 1 year ago #

    Sorry Mikko, I understand now.

    Resolved. Added <?php the_excerpt(); ?> below the permalink

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags