Skip Navigation

[Closed] Search in Custom Post Type view also gives regular posts as results

This support ticket is created 4 years, 10 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Waqar 4 years, 10 months ago.

Assisted by: Waqar.

Author
Posts
#1585923

I am trying to built a filterpage for a custom post type. The taxonomy filters work as expected, but the problem occurs when entering a search term (e.g. Starfighter or Spitfire) in text search (title and content): On the first page only results from the Custom Post Type are shown, which is correct. On the second page we see regular posts appear in the results.

Link to a page where the issue can be seen: hidden link

How can we strictly filter these search results to prevent the regular posts to appear in the results on this page?

#1586249

Hi,

Thank you for contacting us and I'd be happy to assist.

If only a specific post type is selected in the post view's content selection settings, the search results should also be limited to that post type.

To troubleshoot this, I'll suggest the following steps:

1. Please make sure that WordPress, active theme and plugins are all updated to the latest versions.

2. It would be interesting to test this with all non-Toolset plugins disabled and a default theme like Twenty Twenty.

If it's fixed, you can start adding the disabled items, one-by-one, to narrow down to a possible conflicting one.

3. In case the issue still persists, I'll need to see exactly how this post view is set up in the admin area and perform tests on my own website.

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1594061

Hi Tom,

Thank you for sharing the update.

It helps that the issue has been narrowed down to the "Soledad" theme.

I couldn't reproduce this issue with the 5.1 version of the same theme on my test website, but can you please confirm if the issue appears only when "Soledad Child Theme" is active or it's the same with the parent theme as well?

If it is only limited to the child theme, then it would suggest that some custom code in it is interfering with the view's query and you can review all the customizations added through the child theme.

In case it is the same when the parent theme is activated too, then we'll need to investigate it as a potential compatibility issue and a clone/snapshot of your website would prove useful in that investigation:
https://toolset.com/faq/provide-supporters-copy-site/

Please let me know how it goes and I've set your next reply as private.

regards,
Waqar

The topic ‘[Closed] Search in Custom Post Type view also gives regular posts as results’ is closed to new replies.