Search indexing issue - content inside _cornerstone_data field | X Theme

Hi there!

I love Cornerstone, BUT I’m having a big issue.

Some of my page content appears to be locked inside the _cornerstone_data field. I need this content to be searchable, but when I allow it to be indexed, I end up getting search results like the second result here:

When I alter the functions.php file to not index _cornerstone_data, I don’t get those bogus results BUT I also can’t find important content inside.

Can you help? Is there a way to format in cornerstone so important text isn’t locked inside that field?

X Theme
Relevanssi Search Plugin

Hey David,

The Search Result page gets the Post excerpt and since the Page Post Type doesn’t have an excerpt out of the box in WordPress, it gets some text in the WordPress Content Area.

Cornerstone content is composed of shortcodes and that’s placed inside the WordPress Content Area that’s why you see just codes. It won’t read the actual Cornerstone content.

What you can do is first enable the WordPress Excerpt for the Page post type. You need to use a child theme for this and follow the instruction here

You then need to insert a Manual Excerpt to each of your page. See

I tested that on my site and it works so it should work on your end too provided there’s no conflict with your other plugins. If it does conflict with other plugins or any other factors, please consult with a developer to develop a specific solution for your WordPress setup.


Hope that helps.

Thanks Christian. I’ll give that a try.

One clarification: the search results aren’t showing excerpts from the pages but content surrounding each keyword as determined by the Relevanssi plugin.

Should your solution still work?

Hello David,

By default, WordPress does not allow excerpts on pages. To learn more about Pages, check this out:

You can override the WordPress default and add an excerpt to a page by following the given link:

Once the modifications has been made, the pages will then show excerpts in search results page.

Hope this helps.
Hope this makes sense.

Thanks Ruenel,

That didn’t work for me.

I’ve added the code to the functions.php file like you said in the activated child theme and added an excerpt for the page, but the search results remain the same. As you can see here.

I’m a little confused because the other excerpts included in the search results are not excerpts from the pages, but instead are snippets created by Relevanssi around the search terms. With your solution, should I be seeing my the excerpt I entered here instead?

Grateful for any way you can help.


Hey David,

Thank you for clarifying.

That means that the Relavanssi plugin is overriding the search output of WordPress. Please contact the Relevanssi support to learn if their plugin could grab the Manual Excerpt I’ve mentioned.

It is not our theme that is causing the issue. You’ll get the same issue if you use any page builder that uses shortcodes.


Thanks Christian,

Unfortunately, I’m not interested in grabbing a manual excerpt from the page in the search results at all.

I’m hoping to get the search results to display the the page’s text surrounding the search terms (like Relevanssi does normally) but to exclude the custom fields that include shortcodes.

I’ve pinpointed the field that is causing the issue: _cornerstone_data

The problem is that when I tell Relevanssi not to index that field, I am unable to get search results for entire pages leading me to believe that there is important text content that must be indexed stored inside this field – right next to shortcodes.

For example, if you search ( ) you can see the shortcodes are included in the results surrounding the text on the page (hyperlinked text). When I exclude _cornerstone_data from the index, the page where the text appears doesn’t appear in the results at all.

Is there any way to separate the text that must be searchable from the shortcodes? It seems like, as things stand, they appear as one and the same.

Hopefully that makes sense.

I appreciate any solutions you can offer,


Hey David,

The only content that Releanssi or any other search plugin needs to index is the WordPress Content where the generated output of our builder is inserted particularly the [content_seo]. _cornerstone_data is for our builder’s use only.

I’m not sure why Relevanssi would connect to _cornerstone_data. You need to contact the Relevanssi support about this also especially for the output. Those are not controlled by X and Cornerstone.

There is one solution that I personally think will solve the problem and that is to move the [content_seo] as the first part of the content. That can’t be done using custom code so I’ll post this in our issue tracker so our development team will know about this but just note that this isn’t an issue with our builder alone.

Thank you for understanding.

Hey Christian,

Thanks for the note. I think I understand.

Still stumped why whole pages wouldn’t show up in search unless the plugin indexes the _cornerstone_data. If you have any ideas on that one, I’d love to know.

I’ll go back to the drawing board. Thanks for taking my questions!


You are most welcome David!