• Resolved Vane

    (@vanetreg)


    Hi,

    it’s written that:
    “Page Assignment: Assign reviews to Posts, Pages, and Custom Post Types (i.e. Products)”
    but does it mean assign one-by-one or in bulk? It matters when we have thousands of Woocommerce Products or Books, Cars, Real Estates, Local Businesses or whatever entities of a directory website.
    When we think about a Woocommerce webstore with multiple different product categories, we’d add unique and different rating / review templates to mobile phones and different to televisions etc.

    So can we do it, and if so, one-by-one or in bulk?

    Thank you

    • This topic was modified 5 years, 2 months ago by Vane.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    First of all, reviews are generally given for individual entities (a product, book, car, business).

    1. Do these entities each have their own page? If yes, then you should assign reviews directly to those entities by adding the shortcodes to the entity page:

    [site_reviews_summary assigned_to=post_id] 
    [site_reviews assigned_to=post_id schema=true] 
    [site_reviews_form assign_to=post_id] 

    This will automatically assign new reviews to the current entity page, and only show the rating summary and reviews assigned to the current entity page. Enabling the schema option will generate the JSON-LD schema that will be used by google search (when showing search results that link directly to your entity page).

    2. If your entities do not have their own page or URL, then you can instead assign reviews to a Site Reviews category (however, in this case you should not enable the schema since your entities do not have a dedicated URL).

    [site_reviews_summary category=iphone] 
    [site_reviews category=iphone] 
    [site_reviews_form category=iphone] 

    3. If you have thousands of products, then for performance reasons you should only be assigning to a page OR to a category, but not both. Using only one or the other will allow Site Reviews to cache the rating summary; if you use both, then Site Reviews will need to calculate the rating summary on each page load.

    4. If you need to bulk assign existing reviews to existing entities, you can use the bulk edit tool:

    • This reply was modified 5 years, 2 months ago by Gemini Labs.
    • This reply was modified 5 years, 2 months ago by James Huff.
    Thread Starter Vane

    (@vanetreg)

    I have entities with distinct pages (custom post types), with their own URLs.

    I like the shortcode you wrote, I know other rating plugins which works this way as a review template, I think I can add it to the specific content template I use for Cars, Books etc.

    My only concern if I have several different entities like
    different categories of Woocommerce Products
    or Books, Cars, Real Estates, Local Businesses,
    I have to create let’s say as many review templates as many Woo categories I have.
    Bulk edit you referred to might do the work though…

    I also don’t see how I setup in shortcode the schema.org entity I want
    like:
    [site_reviews assigned_to=post_id schema=true schema_entity=Book]

    I really like your plugin, I met with it today (searching for a good one for months and having a couple payed plugins) and I hope the addons and proposed featured listed here:
    https://github.com/pryley/site-reviews/blob/master/ROADMAP.md
    will be available ASAP.

    Addons I’d pay for:

    • Review Themes ( star, thumbs, smiley)
    • Multi criteria ratings with criteria and top level averages
    • Rating criteria (string) as a 3rd party shortcode (of custom field or custom taxonomy)
    • flag, search, up and downvote, threaded reviews,
    Plugin Author Gemini Labs

    (@geminilabs)

    1. You can add the shortcodes in your templates like this:

    if (shortcode_exists('site_reviews')) {
        echo do_shortcode('[site_reviews_summary assigned_to=post_id]');
        echo do_shortcode('[site_reviews assigned_to=post_id schema=true]');
        echo do_shortcode('[site_reviews_form assign_to=post_id]');
    }

    2. You shouldn’t really be assigning reviews to your product categories, they should be assigned directly to your products/books/etc.

    3. You don’t include the schema type in the shortcode. If you need to change the schema type per product, use the Custom Fields meta box on the product page to set it:

    If your custom schema type requires other schema properties, please see the Site Reviews FAQ on how to extend the schema. You can use the Custom Fields meta box to add these schema properties in the same way, for more info, please see: https://www.ads-software.com/support/topic/product-schema-issue/#post-11620593

    4. The only add-on that is finished is the images add-on which is beta and will be released next month. Others will be developed and released this year, but I cannot tell you which will be developed first.

    Thread Starter Vane

    (@vanetreg)

    This is what I referred to, that it’s good to set a default scheme type,
    but no one wants to set it up one-by-one (as it’s written on screenshot you attached: “per-post/page basis”)
    I asked for 2 options:
    1) 1 CPT -> 1 schema type (Book CPT -> Book schema)
    2) 1 CPT filtered by category -> 1 schema type ( Local Business CPT, Store or Travel Agency Category -> Store or TravelAgency schema type

    Adding in a directory site to every each Store or Travel Agency the right schema type is a pain… ??

    Plugin Author Gemini Labs

    (@geminilabs)

    In that case, please see the FAQ page for how to extend the schema, then add your schema customisations there.

    For example, if your default schema type in the settings is “LocalBusiness”:

    add_filter('site-reviews/schema/LocalBusiness', function ($schema) {
        $currentPostType = get_post_type();
        if ('product' == $currentPostType) {
            $schema['@type'] = 'Product';
            // add other schema properties here as needed
        }
        if ('book' == $currentPostType) {
            $schema['@type'] = 'Book';
            // add other schema properties here as needed
        }
        return $schema;
    });

    The reason Site Reviews makes use of the Custom Fields meta box for customising the schema values is that many of your schema properties values are unique to the product/page (i.e. minimum pricing, pricing variables, isbn, etc.). These values are already likely stored on the product page using a custom meta box, so it makes sense to add any other schema customisations in the same way.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bulk assignment to custom post types’ is closed to new replies.