Navigation überspringen

[Gelöst] Can you exclude a CPT from the default wordpress search?

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
Exclude a custom post type from the website general search.

Solution:
What you can do is to install the relevanssi plugin and set the plugin to not index that CPT.
https://wordpress.org/plugins/relevanssi/

This support ticket is created vor 6 Jahren. 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von larryB-3 vor 6 Jahren.

Assistiert von: Shane.

Author
Artikel
#1193325

I have created several CPTs and with one of them, I want to never show in wordpress search results. Is there some code I can include in my code snippets to prevent search from returning a selected CPT in the results?

#1193383

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Larry,

What you can do is to install the relevanssi plugin and set the plugin to not index that CPT.
https://wordpress.org/plugins/relevanssi/

Thanks,
Shane

#1193684

My issue is resolved now. Thank you!