@seanrnicholson, Shortcodes inside search result is a known issue and we have raised the priority of the task.
For Post and Page, we have also included in our suggestion list to make them separate in our coming updates.
Thanks, I noticed there was a recent update to the plugin. Is there any ETA on the following elements:
1) Search results still display shortcode results
2) Splitting search results between posts and pages
Thanks!
–Sean
Hi @seanrnicholson, These should be fixed in next couple of week.
A work around is to edit post-ajax.php and add this
<?php
if ( get_post_type( get_the_ID() ) == 'post' ) {
$content = wp_strip_all_tags( do_shortcode( get_the_content() ) );
$trimmed_content = wp_trim_words( $content, 20, '...' );
} elseif ( get_post_type( get_the_ID() ) == 'page' ) {
$content = wp_strip_all_tags( do_shortcode( get_the_excerpt() ) );
$trimmed_content = wp_trim_words( $content, 20, '...' );
}
?>
Hi @exentric,
we already have been stripping search results.
Hi BuddyBoss,
Are you sure you are stripping search results? I just activated version 1.1.7, which seems to be the latest, and I am still getting Visual Composer shortcodes showing up in search results.
I tried both snippets mentioned above and neither worked. Please confirm that the plugin is taking out the shortcodes and provide some help for those it’s not working for.
Thanks
The plugin is not stripping VC tags (maybe this is where the mix up is happening), so as you can see in my code I tell it to show the excerpt instead of the content if it is a page because I only use VC on pages and not posts
Hi @exentric,
I tried your code but it didn’t work- I don’t know why. I’m hoping BuddyBoss will post a new reply and get this issue fixed.
@catonezillion We have included in our todo list and will try to wrap in our next update.