What is filter for ‘software application’ schema

#782254
  • Resolved Anonymous
    Rank Math free

    Dear Rank Math Support Team,

    I am writing to express my frustration and seek immediate assistance regarding an issue I’ve encountered with your SEO plugin. I followed the guidance provided on your website (https://rankmath.com/kb/filters-hooks-api-developer/) to modify the product schema using add_filter( 'rank_math/snippet/rich_snippet_product_entity'. This process went smoothly. However, when attempting to apply a similar method to modify the ‘software application’ schema using add_filter( 'rank_math/snippet/rich_software_entity', it had no effect whatsoever.

    Can you provide me with a clear, concise solution on how to successfully modify the ‘software application’ schema? I expect a prompt and effective response to resolve this issue.

    Best regards,
    Focus

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

    I apologize for the inconvenience you are facing with modifying the ‘software application’ schema using the filter. To modify the ‘software application’ schema, you should use the following filter:

    add_filter('rank_math/snippet/rich_snippet_software_entity', function( $entity ) {
        // Your custom code here
        return $entity;
    });

    Please replace your existing filter with the one mentioned above, and make sure to add your custom code within the filter function to achieve the desired modifications to the ‘software application’ schema.

    If you encounter any further issues or need additional assistance, please feel free to reach out to us.

    Thank you for your understanding and patience.

    Best regards,
    Rank Math Support Team

    Sources:
    Software Schema Type » Rank Math
    How to Earn Star Ratings in SERPs by Using Schema Markup With Rank Math? » Rank Math
    How to Remove Keywords Data from Article Schema » Rank Math
    Remove All Schema from Product Category Pages » Rank Math

    Anonymous
    Rank Math free

    Dear Rank Math Support Team,

    I use this code, but it didn’t work.

    add_filter( ‘rank_math/snippet/rich_snippet_software_entity’, function( $entity ) {
    if ( ! is_singular( ‘tools’ ) ) {
    return $entity;
    }

    // Change the operating system
    $entity[‘operatingSystem’] = ‘Windows, macOS, Linux’;

    // Modify the offers
    // $entity[‘offers’] = array(
    // ‘@type’ => ‘Offer’,
    // ‘price’ => ‘99.99’,
    // ‘priceCurrency’ => ‘USD’
    // );

    // // Add an aggregate rating
    // $entity[‘aggregateRating’] = array(
    // ‘@type’ => ‘AggregateRating’,
    // ‘ratingValue’ => ‘4.5’,
    // ‘ratingCount’ => ‘100’,
    // ‘bestRating’ => ‘5’,
    // ‘worstRating’ => ‘1’
    // );

    return $entity;

    });

    Best,
    Focus

    Hello,

    Please disregard the previous reply from our bot.

    To modify the Software Application schema, you should use rich_snippet_softwareapplication_entity.

    Here’s the code you can copy and paste as well:

    add_filter( 'rank_math/snippet/rich_snippet_softwareapplication_entity', function( $entity ) {
    if ( ! is_singular( 'tools' ) ) {
    return $entity;
    }
    
    // Change the operating system
    $entity['operatingSystem'] = 'Windows, macOS, Linux';
    
    // Modify the offers
    // $entity['offers'] = array(
    // '@type' => 'Offer',
    // 'price' => '99.99',
    // 'priceCurrency' => 'USD'
    // );
    
    // // Add an aggregate rating
    // $entity['aggregateRating'] = array(
    // '@type' => 'AggregateRating',
    // 'ratingValue' => '4.5',
    // 'ratingCount' => '100',
    // 'bestRating' => '5',
    // 'worstRating' => '1'
    // );
    
    return $entity;
    
    });

    Hope that helps.

    Anonymous
    Rank Math free

    Hi,

    Thanks a lot for your help!

    Hello,

    We are glad to hear that this issue has been resolved. Thank you for letting us know. This ticket will be closed now, but you can always open a new one if you have any other questions or concerns. We are here to help you with anything related to Rank Math.

    We appreciate your patience and cooperation throughout this process.

    Thank you for choosing Rank Math.

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

The ticket ‘What is filter for ‘software application’ schema’ is closed to new replies.