How to exclude a subdirectory from WP search that has no category or page/post ID?

I need to exclude a folder from the built-in WP search. We have a folder built dynamically from a plugin, and need it to be excluded – so if the URL is:

www.acme.com/blog/material

Read More

I need everything under “material” excluded. The catch is there is not a category or ID associated with the “material” folder, so I somehow need to refer to it by the URL string. So basically, don’t return anything with that URL of any subfolder of the URL.

Thanks for any help!

Related posts

Leave a Reply