Cornerstone edited pages show a mess in search

I’ve put together a page using the very handy Cornerstone editor, but when using the search function, the results for that page are a complete mess, full of shortcodes and parameters. It would look awful to a site visitor.

Tell me there’s an easy way around this.

I’m a big fan of making my own excerpts for pages, strictly due to producing cleaner search results pages. https://www.wpbeginner.com/plugins/add-excerpts-to-your-pages-in-wordpress/ You add a quick line to your child theme’s functions.php file and then you can add excerpts to pages.

Are you using Cornerstone as a standalone plugin, or with X Theme? If it’s standalone, your theme will largely dictate what appears in the search results, which might explain the shortcodes showing instead of text. Many will default to showing the excerpt if it exists, which makes the solution above work.

One plugin i run on almost every site is Relevanssi https://en-ca.wordpress.org/plugins/relevanssi/ which has the option to execute shortcodes. It also allows for more granular control over what post types get indexed for the WordPress search.

1 Like

Hi Cal,

As Michael said this is something related to nearly every Page Builder usage and the problem is that the shortcodes do not render when it comes to the search page.

Our theme does not have any specific template for the search page and uses the same index.php file. The best solution is to add excerpts to your posts and pages as Michael said and use the relevant information there.

Thank you.

1 Like

Thanks for the advice, Relevanssi seems to fix that issue all on its own.

Cheers!

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.