Where or how to add additional schema

#131885
  • Resolved Ok Web
    Rank Math free

    Today after searching the forums and not finding the answer, I ask for your help regarding that …

    I want to add an additional schema to the website contents, specifically a json generated by the Google tool.

    Where in the plugin or how can I add it?

    Thank you.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math, and sorry for the inconvenience caused.
    All these requirements can be achieved by adding custom schema markup within this filter:

    
    /**
     * Collect data to output in JSON-LD.
     *
     * @param array  $unsigned An array of data to output in json-ld.
     * @param JsonLD $unsigned JsonLD instance.
     */
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	return [];
    }, 99, 2);
    

    The next step is to use an online schema generator such as this one:
    https://technicalseo.com/tools/schema-markup-generator/ to generate the schema that you would like to use and pass this to the filter above.

    Your custom schema markup will then be integrated into the JSON-LD data that is already available on the page from Rank Math.

    The Pro version of Rank Math also offers an option to import Schema from 3rd party URLs or create your own:
    https://rankmath.com/kb/rich-snippets/#introducing-schema-templates-supercharging-schema-pro

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

The ticket ‘Where or how to add additional schema’ is closed to new replies.