Filter Visual Composer pages from search

Posted in: Newsmag
Post count: 36

We’ve noticed that by default the code from visual composer pages appears in search results (site search). For the moment I’ve manually adjusted search to only return posts, but the same hooks are used when searching things such as the media library, which means we can’t currently search uploaded images.

Is this the default behavior? Is there a more elegant workaround?

Post count: 6600

Hi,

You can set the post type you want to use on search query and add just tho ones you want to filter.
Here is an example: http://www.wpbeginner.com/wp-tutorials/how-to-exclude-pages-from-wordpress-search-results/ ..you can try to add the attachment post type to this eaxample: https://codex.wordpress.org/Post_Types#Default_Post_Types

Hope this helps!

Thanks

Post count: 36

So by default your customers will see visual composer code in their search results? You don’t filter this stuff out?

Post count: 6600

Hi,

The VC shot-codes aren’t appearing in the search result’s by default. I’ve tested this using the latest theme version: http://screencast.com/t/1WQIaSQghttp://screencast.com/t/Q8mu3bD8k – all this are homepages so if the short-codes would appear on search result they should also appear here.

You can also test this on our demo: http://screencast.com/t/ZqoQIDpmYEGn

Let me know of your issues details and provide an example if you’re still experiencing this.

Thanks

Post count: 36

I have example queries which will return VC code. Will email over an example.

Post count: 6600

Replied via email!
Thanks

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newsmag’ is closed to new topics and replies.