Hi @maparle,
Lovecraft doesn’t do anything special with the search results, so if it isn’t behaving the way it should, my guess would be that the issue is in the plugin.
— Anders
I’m the search plugin author maparle went to next… The search plugin (Relevanssi) works fine with Lovecraft, it’s just that Lovecraft shows full posts on the search results pages (because there’s no specific search results content template). That’s what confused maparle.
That’s not what most users except, so I would suggest making the default behaviour to show excerpts on search results pages instead of full posts – have that as an option if you like, but I’m pretty sure most users – and all search plugins – expect to see the_excerpt() instead of the_content() on the search results page.
-
This reply was modified 7 years, 1 month ago by
Mikko Saari.
Anders, It is Lovecraft that is the problem. I have made the changes to content.php as suggested by Mikko Saari and I now get excerpts and search word highlighted. However no link shown and excerpts not formatted as normally expected. Please think about adding a searchresults.php file to your theme to properly handle search query results. Thank you, Michael.
Hi @msaari,
I see – thanks for the reply! And sorry for pointing fingers.
@maparle: Outputting the excerpt strips the formatting from the content, which is why I prefer not using it. You can use the More block/button to cut off the content on archive pages and display a “Read More” button, like on the demo site: http://andersnoren.se/themes/lovecraft/ It sounds like that doesn’t work with the search plugin though, so you can leave the changes Mikko helped you with as-is.
— Anders