Title: Custom excerpts/snippets
Last modified: August 20, 2016

---

# Custom excerpts/snippets

 *  Resolved [lfaber](https://wordpress.org/support/users/lfaber/)
 * (@lfaber)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/custom-excerptssnippets/)
 * 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/](http://wordpress.org/extend/plugins/relevanssi/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/custom-excerptssnippets/#post-3179398)
 * 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.
 *  [karenelated](https://wordpress.org/support/users/karenelated/)
 * (@karenelated)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/custom-excerptssnippets/#post-3179466)
 * 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](http://elated.co.za)
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/custom-excerptssnippets/#post-3179482)
 * 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](http://www.relevanssi.com/knowledge-base/query_posts/).
 *  [karenelated](https://wordpress.org/support/users/karenelated/)
 * (@karenelated)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/custom-excerptssnippets/#post-3179486)
 * 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?
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/custom-excerptssnippets/#post-3179488)
 * 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?
 *  [karenelated](https://wordpress.org/support/users/karenelated/)
 * (@karenelated)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/custom-excerptssnippets/#post-3179489)
 * Sorry Mikko, I understand now.
 * Resolved. Added <?php the_excerpt(); ?> below the permalink
 * Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Custom excerpts/snippets’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [karenelated](https://wordpress.org/support/users/karenelated/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/custom-excerptssnippets/#post-3179489)
 * Status: resolved