Sauter la navigation

[Résolu] Search for CPT in admin shows Posts insteads

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 4 années et 3 mois. 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)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par Puntorosso Il y a 4 années et 3 mois.

Assisté par: Christian Cox.

Auteur
Publications
#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.

lien caché

Tested with Relevanssi enabled/disabled.

Here the Relevanssi settings:
lien caché

and the Toolset CPT settings
lien caché

#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