Skip Navigation

[Resolved] Search for CPT in admin shows Posts insteads

This thread is resolved. Here is a description of the problem and solution.

Problem: I have a custom post type created by Types. When I visit the CPT dashboard and perform a search, I see results from another post type appear.

Solution: Disable custom code that is interfering with search.

This support ticket is created 3 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by Puntorosso 3 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1937261

When doing a search in admin for a CPT, I get no results, even if the searched word exist in some titles.
Instead, I get results from the normal Posts type.

hidden link

Tested with Relevanssi enabled/disabled.

Here the Relevanssi settings:
hidden link

and the Toolset CPT settings
hidden link

#1938133

Hello, I did a quick test in my local environment to try to reproduce this problem, but didn't have the same results. I suspect there could be some interference from a theme or other plugin. Can you try troubleshooting by deactivating all plugins except Types and activating a default theme like Twenty Twenty One? If you have any custom code active in Toolset > Settings > Custom Code, please temporarily deactivate those snippets during testing. If you want to activate a maintenance mode plugin during testing that should be okay.

If the problem is resolved, reactivate your theme, other plugins, and snippets one by one until the problem returns. Let me know the results of these tests and we can go from there.

#1938411

I did the test disabling all other plugins, but forgot about the Toolset > Settings > Custom Code 🙁
It was a custom function that interfered with the search.

Thanks for the hint.
Best