the_content_rss Search Highlighting

2 months ago | michaelbenson (Member) | |

Hey Guys,

I am currently using the call the_content_rss in my ./theloop.php file to display post content when viewing archives or searches, since this allows for an increased "cut" character limit, which the_excerpt does not. However, I have noticed that when using the_content_rss highlighting done by Search Unleashed no longer takes place (although the title is highlighted correctly). Any ideas on how to get this working?

Thanks.

Read responses...

Responses

  1. John:

    Posted 2 months ago by Key Master

    I would be very wary of using a function like the_content_rss to display content outside of the RSS feed and would suggest instead that you look at using an excerpt plugin.

  2. michaelbenson:

    Posted 2 months ago by Member

    Why is that? There does not appear to be any differences between the output of the functions; the_content_rss and the_excerpt, except that there is greater control over the cut limit with the former function.

  3. John:

    Posted 2 months ago by Key Master

    Two reasons. One is purpose. The the_content_rss function is meant for RSS feeds and while it may work outside it for now there is no guarantee it will do so in the future. WorodPress changes rapidly and I've personally been bitten several times by misusing a function that subsequently changed or disappeared.

    The second is for plugins (like Search Unleashed!) - no plugin is expecting you to use the_content_rss and you may find yourself having to chase up changes to get things to function properly. To me it seems cleaner and easier (in the long run) to use something created specifically for excerpts. I know there are lots of these plugins and you could even take the code form the_content_rss and put it into your own plugin/theme, but call it from the_excerpt! (keeping what you have now, but making it work with everything)

Reply

You must log in to post.

Home | Software | Terms & Conditions | Sitemap | John Godley © 2008