Schema

#784638
  • I am trying to set a Schema for ProfilePage but it’s not available on my Schema Generator. According to the site, it’s supposed to be available for free versions. Is this no longer available for free versions? If not, is it available in Pro version?

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

    I apologize for the inconvenience you are facing while trying to set up a Schema for ProfilePage. The Schema types available in the free version of Rank Math might not include all possible Schema types like ProfilePage.

    To clarify, the availability of the ProfilePage Schema type depends on the version of Rank Math you are using. If you are using the free version and cannot find the ProfilePage Schema type, it might be a limitation of the free version.

    However, the Pro version of Rank Math offers a Custom Schema Generator that allows you to create custom Schema types, including ProfilePage. You can access this feature by upgrading to Rank Math PRO.

    If you have any further questions or need assistance with setting up the Schema for ProfilePage using Rank Math PRO, feel free to ask. Thank you for raising this concern!

    Sources:
    Configuring “Schema Markup” in Rank Math » Rank Math
    How to Use Rank Math’s Custom Schema Generator » Rank Math
    How to Use Multiple Schema Markup Types With Rank Math PRO » Rank Math

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    Hello,

    Thank you for contacting support.

    This type of Schema is added automatically to the author archive pages whether you are using the Free or the PRO version of the plugin.

    Beyond that, it’s not possible to add this to other pages without using some customization with the help of the following filter: https://rankmath.com/kb/filters-hooks-api-developer/#extend-json-ld-data

    In the PRO version that customization becomes easier but still needs to be done either with the Advanced Schema Generator or the Schema Templates.

    Don’t hesitate to get in touch if you have any other questions.

    Ok great. I was just trying to apply the Schema to my About page and wanted to use the ProfilePage schema, but I couldn’t find it. I turned on the author pages but I don’t think it works the same as the ProfilePage schema would.

    Hello,

    Since you want to add it to the About page and you do not have the PRO version of the plugin you will have to modify the following filter to target the about page and include your desired JSON-LD code there:

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

    Here’s an example of how you can modify the code snippet to target the About page and add the ProfilePage schema:

    /**
     * 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 ) {
        // Get the current post ID
        $post_id = get_the_ID();
        
        // Check if the current post is the About page
        if ( is_page( 'about' ) ) {
            // Create the ProfilePage schema markup
            $profile_page_schema = [
                '@context' => 'https://schema.org',
                '@type' => 'ProfilePage',
                'name' => get_the_title( $post_id ), // Get the title of the About page
                // Add additional properties as needed
            ];
            
            // Merge the ProfilePage schema with existing JSON-LD data
            $data[] = $profile_page_schema;
        }
        
        return $data;
    }, 99, 2);

    Replace ‘about’ with the slug or title of your About page to target it specifically. You can also customize the ProfilePage schema properties according to your requirements.

    Hope that helps.

    Thanks.

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

You must be logged in to reply to this ticket.