New Schema Type Requests / Is it pluggable?

#48794
  • Resolved Joel Goodman
    Rank Math free

    Are Schemas pluggable so I can create a plugin to add new ones? Specifically, there isn’t a WP plugin for Schema generation that supports CreativeWork > Episode > PodcastEpisode. I’m using RankMath SEO for a podcast site and I’d really like to be able to define each Podcast post as a PodcastEpisode. I suspect you’d gain a lot of adoption from podcasters if there was a way to set up that Schema.org structure within the plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Alberto
    Rank Math business

    Hello,

    Thank you for contacting Rank Math today.

    If you would like to add a custom schema and have it working without conflicts, then I can suggest that you hook into the following filter to add the custom schema (you will need to modify this code but it is a guide to start):

    /**
     * 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 ) {
            if(is_singular('post type name here')){
    	$data['schema type'] = [
    			'@context' => 'https://schema.org',
    			'@type'    => '',
    			'@id'      => '',
    			'name'     => '',
    			'url'      => '',
    			'sameAs'   => '',
    		];
    	return $data;
    	}
    	return [];
    }, 10, 2);

    Looking forward to helping you. Thank you.

    Amazing! Thanks for the help.

    Alberto
    Rank Math business

    Hello Joel,

    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.

    I’d also like to add my voice to this request! I have podcasts amongst other types of content, and it would be great to have this option out of the box.

    Hello,

    Thank you for your suggestion. I’ff forward this to the dev team for consideration

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

The ticket ‘New Schema Type Requests / Is it pluggable?’ is closed to new replies.