Possible to No-index custom post type taxonomy
-
Hi,
I’ve been reading the API docs and can’t seem to get this working.
I have a custom post type, with its own term taxonomy for “category” and “tag”.
CPT = projects
CPT Cat = project_category
CPT Tag = project_tagI would like to noindex and nofollow all the project tags, but I can only do this if I edit each new tag one at a time.
Is there a filter that works to do this?
overwrite term meta, untested:
This results in white screen.
I also found this old reply, but it doesn’t seem to have any effect:
add_filter( 'the_seo_framework_robots_meta_array', 'my_robots_adjustments', 10, 1 ); function my_robots_adjustments( $robots = array() ) { // Pick one or leave both conditions: if ( 'mycoolposts' === get_post_type() || is_post_type_archive( 'mycoolposts' ) ) { // Keys match the value. Legacy code. $robots['noindex'] = 'noindex'; $robots['nofollow'] = 'nofollow'; } return $robots; }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Possible to No-index custom post type taxonomy’ is closed to new replies.