noindex expired job listings
-
Hello!
I am trying to add a custom code custom code using the Yoast developer filter wpseo_robots that will make my Yoast SEO plugin automatically set expired job pages to ‘noindex’.
I’ve been told to look at this code example to see how the filter can be used, and I’ve tried to add this:
add_filter( ‘wpseo_robots’, ‘yoast_seo_robots_remove_single’ );
function yoast_seo_robots_remove_single( $robots ) {
if ( job_is_Expired ) {
return ‘noindex,nofollow’;
} else {
return $robots;
}
}but it is not working – as I don’t know what condition I should be putting in the ‘if’
I was wondering if anyone would be able to help me with this.
Thanks a lot!
The page I need help with: [log in to see the link]
- The topic ‘noindex expired job listings’ is closed to new replies.