Dynamically setting meta robots value based on page logic
-
I’m trying to build out a mesh of pages on my site for search engines to crawl. I’d like to be able to dynamically set the meta robots tag for “all” pages under the /foobar/ endpoint. For example:
/foobar/page-one -> noindex
/foobar/page-two -> index
/foobar/page-three -> noindexI’m using the Yoast plugin which allows you to set the index status of all the pages under an endpoint, but I need more granular control than that.
This page
/wp-content/themes/mm-throne/single-boardgame.phpuses
get_template_part
to call this page (which does all the work)
/wp-content/themes/mm-throne/sections/loops/single-layout-boardgame.phpSo I need to pass a value from that innermost include up the chain to the header.
Anyone have ideas?
The page I need help with: [log in to see the link]
- The topic ‘Dynamically setting meta robots value based on page logic’ is closed to new replies.