• Resolved Bakhshi

    (@bakhshi)


    Hello

    add_filter('wpdiscuz_rating_schema', function ( $rating_schema, $key, $postid ){
        $my_rating_schema = 'Book';
        $rating_schema = str_replace(__('Article Rating', 'wpdiscuz'), $my_rating_schema . ' Rating', $rating_schema);
        return preg_replace( '|schema\.org\/Product|i', 'schema.org/' . sanitize_text_field($my_rating_schema) , $rating_schema);
    },11, 3);
    add_filter('wpdiscuz_rating_schema', function ( $rating_schema, $key, $postid ){
        $my_rating_schema = 'SoftwareApplication';
        $rating_schema = str_replace(__('Article Rating', 'wpdiscuz'), $my_rating_schema . ' Rating', $rating_schema);
        return preg_replace( '|schema\.org\/Product|i', 'schema.org/' . sanitize_text_field($my_rating_schema) , $rating_schema);
    },11, 3);

    I am going to use both of them, I mean:
    I am going to put some page as “books”, and other as “SoftwareApplication”.
    what should I do?

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using Aggregate Rating Schema’ is closed to new replies.