Search results show The Grid as shortcodes on pages

Hi!
I disabled search from menu on this site https://ellego.fi/ since it gave bad results: https://ellego.fi/?s=products

Pages with The Grid plugin seems to show on search results as shortcodes. I use Visual Composer with “Legacy X Integration” enabled.
I tried to find similar issues on topics here, but was not sure if they apply to this.

Is there anything to be done?

Best Regards,
Rani Salminen

Hi There,

Those pages contain the grid gallery so there is no text excerpt.

I recommend you manually add the excerpt for those pages, by adding the following code to the functions.php file locates in your child theme:

add_post_type_support( 'page', 'excerpt' );

For more information, please take a look at this:

Or we can also exclude the pages from the search result:

Hope it helps :slight_smile:

Thank you, that works! Awesome :slight_smile:

But I think you should think about changing the search mechanic for the theme so that if there is no excerpt it leaves the text area on results blank, if that’s possible to do into the theme.

I have a multilinguas site so I need to do quite a lot of excerpts, since blank excerpt did not help. But it works, that’s the main thing :slight_smile:

Cheers!

Thanks for your suggestion and feedback!
Our development team will look on to it.

Thanks

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