advanced custom fields – Exclude certain Gutenberg blocks from search results


I have a site that I have built using a series of ACF Gutenberg Blocks. The issue I have is when the search functionality is used. Searching obviously goes through the_content() to find appropriate results, but because of the different types of blocks used, sometimes their content contains the search term, but it is not really a relevant result.

For example, if I have an article on diabetes and at the bottom I have a list of other recent posts and one of those is an article on arthritis, if I search for arthritis, the diabetes post will appear in the search results. Arthritis genuinely appears in the_content(), but it really is not a relevant result.

Is there a way to exclude this?

I have looked into different plugins, but I can not find anything that seems to do this.

user7951130 1 month 2021-10-25T01:58:54-05:00 0 Answers 0 views 0

Leave an answer