Add my own schema

#6633
  • Resolved Leonardo Wolff
    Rank Math free

    Hi,
    I like to add my own schema in some pages, and it would be nice if RankMath had a “custom schema”, where I can add, in a per post/page basis my own code.

    Is this possible? Thank you

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    This feature is available in the plugin 🙂 You can make use of the below filter to remove json-ld data from your posts and with a little logic customization using conditionals, you can get it to execute only on certain pages:

    /**
     * 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"] );
    	}
    });

    I hope this info helps. 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 ‘Add my own schema’ is closed to new replies.