Skip Navigation

[Resolved] Search box return others custom post types too

This support ticket is created 5 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Beda 5 years, 3 months ago.

Author
Posts
#1187265
screencapture-intranet-adisson-lease-liste-des-quotations-2019-01-19-06_27_08.jpg

Hello
I have a custom post type = "quotation" my search box on Views template is returning others custom post types too.

You must be connected to do a search here :
hidden link

view_id=38128

Thank you

#1187329

I see you created those Post Types with something else than Toolset, but query them with Toolset Views.

I see there are 222 posts in the Quotation type, and indeed, your View in the Front end also returns 222 found items before the search.
You can easily confirm that by inserting the below shortcode just below [wpv-items-found] within your view:

[wpv-found-count]

It'll tell you the posts found, and it says 222.

Hence it cannot be that this view returns also results of other post types.

However, I see there are MANY other post types included in this results.
Not only the "activites", but also "voyages", and others.
It is not clear to me why. I suspected you use some Post Type Switcher, however, I could not find such a plugin on your site, and the Slugs of the Post types seem all fine.

The only I can think of is a compatibility issue with the plugin you use to create the Custom Post Types, because when created manually or with Toolset, this does not happen.

1. Since when is this issue happening?
2. Does it happen if you remove all plugins but Toolset and the Post Type plugin you use?
3. Does it happen with another theme?

Something is changing the Query, it hence could also be that you apply custom code somewhere and change the Views query.

If nothing above helps, please send us a copy of this site.
https://toolset.com/faq/provide-supporters-copy-site/
Please try to exclude any part from the export that is not necessary to see the issue, such as other plugins, or custom code, etc.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.