Saltar navegación

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

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 6 años. 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)

Etiquetado: 

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por larryB-3 hace 6 años.

Asistido por: Shane.

Autor
Mensajes
#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

Idiomas: Inglés (English )

Zona horaria: 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!