Switching Schema Off for a page

#99502
  • Resolved Ovenclear
    Rank Math free

    Hi. I need to be able to switch Schema off for just one page on a site?
    Is this possible?
    Thanks
    Graham

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

    Thank you for getting in touch with us.

    Just head over to the page, click on edit page the head to Rank math meta box and delete the schema under the schema tab.
    img

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hi.

    Many thanks.

    Tried that, but it still seems to leave some schema in the code?

    What have I done wrong?

    Hello,

    Thank you for the follow up.

    The option I shared will only delete the on-page defined schema. Some schema markup is defined globally and added to all pages. If you wish to remove all markup added by Rank math then you can add the following filter in your theme functions.php:

    
    /**
     * Code to remove json+ld data
     * 
     */
    add_action( 'rank_math/head', function() {
    	global $wp_filter;
    	if ( isset( $wp_filter["rank_math/json_ld"] ) ) {
    		unset( $wp_filter["rank_math/json_ld"] );
    	}
    });
    

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Switching Schema Off for a page’ is closed to new replies.