-
Hi,
Some time passed until I heard from our theme developer. He sent me a code snippet which doesn’t work, so I went ahead and wanted to test whether having a double robots tag which basically both says noindex would be a temporary fix. I went ahead and tested it on one specific job which Google is giving me an error for: https://fiks.nl/vacature/skillz-talent-workforce-communicatie-marketing-stage-sittard-12290/
#-----------------------------------------------------------------# # Rank Math: filter the robots meta data. # @param array $robots The meta robots directives. # Remove action in wp_head #-----------------------------------------------------------------# add_filter( 'rank_math/frontend/robots', function( $robots ) { if(get_post_type() == 'job_listing' && get_post_meta( get_the_ID(), '_filled', true ) && get_the_ID() == '12852') { $robots["index"] = 'noindex'; $robots["follow"] = 'follow'; } return $robots; });
As you can see in the html it says ‘noindex’ twice now, so that works. The odd thing, it stays in my sitemap. I flushed the sitemap, cleared my website cache and made sure my sitemap isn’t cached as explained by Reinelle.
My sitemap can be found here: https://fiks.nl/job_listing-sitemap.xml
What else can I do? Looking forward to your answers. Thanks so much!
You must be logged in to reply to this ticket.