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
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.
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.