# SoftwareApplication Structured Data for an App Page

> Adds SoftwareApplication JSON-LD (operating system, category, price and optional rating) to the page that presents your app, plugin or SaaS product.

- Type: PHP
- Runs: Frontend only
- Category: [SEO](https://wpide.com/library/category/seo/)
- Tags: schema, software, json-ld
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/seo-software-app-schema/

## Code

```php
// App details and the ID of the page that presents it.
$wpide_app = array(
    'page_id'      => 42,
    'name'         => 'Acme Planner',
    'os'           => 'Web, iOS, Android',
    'category'     => 'BusinessApplication',
    'price'        => '0',
    'currency'     => 'USD',
    'rating_value' => '',
    'rating_count' => '',
);

add_action( 'wp_head', function () use ( $wpide_app ) {
    if ( ! is_page( (int) $wpide_app['page_id'] ) && ! is_single( (int) $wpide_app['page_id'] ) ) {
        return;
    }

    $data = array(
        '@context'            => 'https://schema.org',
        '@type'               => 'SoftwareApplication',
        'name'                => $wpide_app['name'],
        'operatingSystem'     => $wpide_app['os'],
        'applicationCategory' => $wpide_app['category'],
        'url'                 => get_permalink( (int) $wpide_app['page_id'] ),
        'offers'              => array( '@type' => 'Offer', 'price' => $wpide_app['price'], 'priceCurrency' => $wpide_app['currency'] ),
    );

    if ( is_numeric( $wpide_app['rating_value'] ) && absint( $wpide_app['rating_count'] ) ) {
        $data['aggregateRating'] = array( '@type' => 'AggregateRating', 'ratingValue' => $wpide_app['rating_value'], 'ratingCount' => absint( $wpide_app['rating_count'] ) );
    }

    echo '<script type="application/ld+json">' . wp_json_encode( $data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG ) . "</script>\n";
} );
```

## Notes

Only add a rating when it comes from real, visible reviews; leave rating_value empty otherwise.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "SoftwareApplication Structured Data for an App Page" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
