Skip Navigation

[Resolved] Can you exclude a CPT from the default wordpress search?

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

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 5 years, 9 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 – 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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by larryB-3 5 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#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

Languages: English (English )

Timezone: 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!