Does disabling shortcodes in Relevanssi settings solve this problem?
Yes. I unchecked “Expand shortcodes in post content” and rebuilt the index. When I search for certain terms, I get the error above when on localhost. I get a server error when running off my server.
Ack. There’s no way to edit posts. I mean NO, disabling shortcodes does not solve the problem.
Ok. Looks like the LayerSlider is not compatible with Relevanssi.
Another thing you can try: disable the custom excerpts from Relevanssi. Does that remove the error?
If that does help, please try adding the following to functions.php:
add_filter('relevanssi_pre_excerpt_content', 'disable_layerslider', 10, 3);
function disable_layerslider($content, $post, query) {
remove_shortcode('layerslider');
return $content;
}
If the LayerSlider shortcode is “layerslider”, that code should help. Does it?
When I disabled the custom excerpts, the error went away. Thank you!!
Could you please try the code I posted, with custom excerpts enabled? I’d like to know if that works, because if it does, I’d like to add it to the Relevanssi code, so nobody else would have problems with LayerSlider again (and you could have custom excerpts).
Where do I add the code? I would like to test this out but this is causing errors for me anywhere I put this code in.
You need to put it in the functions.php file in your theme, and make sure it’s inside <?php and ?> tags.
Anyway, if you have the latest version of Relevanssi, you don’t need this code, as it’s already built in.