No Follow Black List Not Working

#37246
  • Resolved Mike Allen
    Rank Math pro
    Content AI Starter Trial

    Hi, My site wide no follow does not seem to be working (see video in sensitive data section). Note the light green product review cards (the ones with the knife images) in the blog post (https://thehealthytreehouse.com/best-japanese-knives/). These have links that take you to Amazon. These links should be no follows, but they seem to be do follow links. Note that these mini product review cards are generated via Jet Engine plugin, which is an ACF + CPT plugin from Crocoblock.

    Do I need to turn on your ACF functionality for this? Does your ACF functionality work for Jet Engine?

    Thanks,
    Mike

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    I can suggest that you test the following code in your theme’s functions.php file

    /**
     * Allows filtering of the robots meta data.
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
            if (strpos($_SERVER['REQUEST_URI'], "?p=") !== false){
                $robots['follow'] = "nofollow";
                return $robots;
            }
    	return $robots;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘No Follow Black List Not Working’ is closed to new replies.