This demo shows how you can have multiple products listed in a grid for rating. But, the catch here is that these products are not part of WordPress – they are not posts or any other data, they might be random products just linked for affiliate purposes.
In this demo, the product’s ratings are assigned to the new rating type, belonging to Custom entity, where we created Type called ‘Products’. And, since we need a unique ID for each one (and ID has to be a positive integer), these ID’s are created based on the ID of this page with added 2 zeroes and numbers 1 to 5 (5 rows).
And, since these are all products that don’t exist in the database, and they don’t have a way to provide names to the plugin, each shortcode defines a title for the item that the plugin will store in the rating database table. So, an example shortcode for every rating in the list is based on this:
[gdrts_stars_rating title="The Phone #1" type="custom.product" id="228001"]
Check out the article about this demo in the Knowledge Base: Products in a Table.
|The Phone #1||228001|
|The Phone #2||228002|
|The Phone #3||228003|
|The Phone #4||228004|
|The Phone #5||228005|