No index issue

#50373
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

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

    You can fix this issue by adding the following code to 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(is_singular('wpquize')){
    		$robots['index'] = "noindex";
    		$robots['follow'] = "nofollow";
                    return $robots;
    	}
    	return $robots;
    });

    I’ve tried to add it myself but your site would not allow me. Please add this code via FTP.

    Looking forward to helping you. Thank you.

    ​​​​​​​

    I think the system allowed you to add the code and maybe it gave an error message because I can see this code in the functions.php code.

    I think it is ok now.
    Thanks

    Alberto
    Rank Math business

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this ticket.