• Resolved naomispirit

    (@naomispirit)


    I am using the system on a Custom Post Type and its displaying and working well when I am directly viewing the custom post. However, I want to display the information from lots of the custom posts on one page and allow users to rate them from that page instead. In fact, I don’t intend on letting users directly view the page at all. http://bit.ly/2bEzrAv

    I’ve tried variations of the shortcodes, but I’m just not able to get the star ratings to display here. Can you help?

    Also ultimately I would like to be able to change the order based on popularity of the cocktail, is this also possible somehow?

    https://wordpress.org/plugins/gd-rating-system/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Milan Petrovic

    (@gdragon)

    You can do this by adding shortcode for every post you want (you must set correct parameters for each shortcode). But, considering that you need to display them in order, you will need to make custom template where you will use WP_Query to get posts you need with the rating ordering parameters and to use rating function to display rating block for each one.

    Plugin functions and ordering of posts by rating is covered in the Knowledge Base. When I get some free time, I can make a tutorial on how to do exactly this.

    Regards,
    Milan

    Thread Starter naomispirit

    (@naomispirit)

    Ordering via popularity can come later, is that the only aspect which requires a custom template?

    Perhaps there is more advice around the correct parameters on the shortcodes to just get them to display at all? My Custom Post Type is called Cocktail. I have tried many variations of the shortcode, but I believe this one should work?

    [gdrts_stars_rating_auto template=”default”
    style_size=40 style_type=”font” style_font_name=”star”]

    There is a rating for the chamomile cocktails and none for the others, but they all display a “No Votes” and no option available to rate.

    Plugin Author Milan Petrovic

    (@gdragon)

    gdrts_stars_rating_auto shows rating block for current post (post in which shortcode is located), regardless of the post type. If you put 10 shortcodes like this, they will all be the same, because they are all in the same post.

    If you want to rate 10 different cocktails, you must define what the cocktail is, is it a post type, or something else. Rating block must be connected via type and ID, plugin needs to know what are you rating.

    Milan

    Thread Starter naomispirit

    (@naomispirit)

    I have tried just passing the info in like this with the post id hadrcoded:

    [gdrts_stars_rating type=”posts.cocktails” id=15308]

    And I still get “No Ratings”. Am I doing something silly here? And next puzzle will be to try and get the id dynamically.

    Plugin Author Milan Petrovic

    (@gdragon)

    This is to show rating block for post type ‘cocktails’ and ID 15308, and it looks OK. Does cocktails post type exist and is the ID read ID for that post/cocktails? Make sure that you are using correct name for the post type and ID.

    Thread Starter naomispirit

    (@naomispirit)

    Hi, I have this working to a degree now – there was an incorrect ” used. It is now displaying the votes of the hard-coded post using this shortcode: [gdrts_stars_rating type=”posts.cocktails” id=15308]

    http://bit.ly/2bEzrAv

    What I don’t have here is the option to rate?

    Also still trying to think of a way to pass in the id of the current post through the visual composer grid tempalte.

    Thanks

    Plugin Author Milan Petrovic

    (@gdragon)

    If you don’t add ID in the shortcode, the plugin will use current post ID. If you can’t rate the post, it maybe related to the rating rules, where by default author can’t vote for the own article. Check the plugin settings for this.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Make Star Rating Show on Post Preview’ is closed to new replies.