Skip Navigation

[Resolved] Hiding a page in custom search results

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

Problem:

Hide a specific page from Views search result.

Solution:

If you are going to exclude a specific page "free-resources"(ID 305) from the search result, you can edit the view, In section "Query Filter", add a post ID filter:

Exclude posts with the following IDs: 305

Relevant Documentation:

https://toolset.com/documentation/user-guides/filtering-views-query-by-post-id/

This support ticket is created 6 years, 2 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 – 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 3 replies, has 2 voices.

Last updated by lukeM-7 6 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1108354

So, the advise here https://toolset.com/forums/topic/filtering-out-free-products-from-site-wide-search-results-issue/

Worked successfully, but I noticed the hidden link

page still returns, how can I stop this from happening? I can't seem to add a category to the page to tag it with free, and therefore not show.

Thanks

#1109256

Hello,

Please elaborate the question with more details:
page still returns, how can I stop this from happening? I can't seem to add a category to the page to tag it with free, and therefore not show.

Which page should not be returned in the result?
Are you going to add a term "free" to the post?

You can also provide your website credentials in below "private detail box", also point out the problem post/page URL, I can login your website and check the problem in a live website, thanks

#1109291

Thanks for the details, I assume we are talking about this search result page:
hidden link

What is condition that you are going to exclude those specific posts?

1) If you are going to exclude a specific page "free-resources"(ID 305) from the search result, you can edit the view "Generic: Search":
hidden link

In section "Query Filter", add a post ID filter:

Exclude posts with the following IDs: 305

https://toolset.com/documentation/user-guides/filtering-views-query-by-post-id/

2) If you are going to exclude all posts assigned to term "Free-Plan" of taxonomy "Access permissions", you can add a taxonomy filter:

Access permissions in no one of these: Free-Plan

More help:
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/

#1110395

Great, makes sense. Good answer and thank you!