Forums › Forums › Search & Filter Pro › Custom post type sharing taxonomy displays posts from different post type
- This topic has 5 replies, 2 voices, and was last updated 4 years, 6 months ago by
Trevor.
-
Anonymous(Private) October 27, 2020 at 11:02 pm #264345
Hi,
I have a problem. I have 2 custom post types “cases” and “news” I am sharing the same taxonomy named “themes”. Now, for Search and filter I have selected one custom post type only but still shows posts from cases on the filter.
Is there a way to keep using the same taxonomies but exclude post type if not selected?
I have added a taxonomy filter.
Thanks.
Trevor(Private) October 28, 2020 at 12:06 pm #264400My name is Trevor (hehe).
If you are using the same taxonomy across multiple Post Types, so that, even if the search is for one Post Type, the count might also add those from the other post types. Since ‘term splitting’ was introduced in WordPress, it is not recommended to use the same taxonomy across multiple post types – instead you should use Custom Fields to do this, as these can be applied to multiple post types. If you need to use taxonomies, you need to have/make separate custom taxonomies for each post type, even if they use the same terms.
-
AuthorPosts