I am using the wonderful Yoast plugin for all sorts of things, but largely to no-index and no-follow pages. We are a PPC based site so therefore we removed search. Now the client wants it back in but I need the wordpress built-in search NOT to return a large number of no-indexed pages.
I know you can build in to exclude various meta descriptions.
I was going to adapt this as a start: https://css-tricks.com/forums/topic/using-wps-pre_get_posts-to-exclude-post-with-meta_key/
Question - What is the term I am looking for - meta-no-index=no??
Why doesn't Yoast do this by default?
You'll need to edit the robots meta tag that is outputted by the wp_head() function.
If using Yoast, this is the WP filter to change the robots meta tag content:
https://wordpress.stackexchange.com/questions/136220/remove-meta-robots-tag-from-wp-head