Skip Navigation

[Resolved] Exclude post type from website search results / Archive

This support ticket is created 6 years, 1 month 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by leilaG 6 years ago.

Assisted by: Luo Yang.

Author
Posts
#1138414

Hello, how do you exclude post type from website search results / Archive?

#1138852
select-post-type-button.JPG
search-result.JPG

Hi,

You can setup Views wordpress archive for the wordpress built-in search results page, see our document:
https://toolset.com/documentation/user-guides/creating-wordpress-custom-post-archives/

see screenshot search-result.JPG, enable option "Search results".

When you edit the Views WordPress archive, in section "Loops Selection", find option " Search results", there is an "Edit" button, click it you will be able to choose specific post types, see screenshot, select-post-type-button.JPG

#1145193

I just came across this tickbox setting on post type -

exclude_from_search
Whether to exclude posts with this post type from search results.

Would this exclude items from the websites search?

We have some content types that we would like to:

Type 1. Exclude from website WordPress search and exclude from web/google search
Type 2. Exclude from website WordPress search and include in web/google search

How do we achieve this?