• Hi there.
    Me again – whatsworthseeing.com
    Unfortunately, I wasn’t able to get to the bottom of my last problem, so I have had to use a different start system for any post that appears on my homepage.
    But I prefer the look of your stars and am still using those on archive posts.
    However, I just noticed that I now have a problem with the way they appear in my “related posts” widget in the sidebar.

    Consider this example – https://whatsworthseeing.com/up-review/

    In the related posts at the bottom of the sidebar, your stars look my better than the other stars – but they take their value from the content of the post they are sitting alongside, rather than the post they relate to – so Danny Collins, which should be displaying 2.5 stars is actually displaying the 4 star rating of Up.

    Can you think of any way that I can ensure that the YASR shortcode, when used in a sidebar widget, reflects the star-rating associated with its own post, rather than the post it is sitting alongside?

    If not, I will have to switch all my stars to the other plugin, but I would prefer to keep yours if I can!
    Thanks.
    JK

    https://www.ads-software.com/plugins/yet-another-stars-rating/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor dudo

    (@dudo)

    Hi,
    once again yasr need to get the proper post id to get working fine.
    How that related post widget works?
    Is that an external plugin, or it comes with your theme?

    Best,
    Dario

    Thread Starter whatsworthseeing

    (@whatsworthseeing)

    Hi Dario.
    It’s an external plugin called Related Posts By Taxonomy – and I’m using tags.

    But yes – I guess I need a way to associate the shortcode with the post-id of the post where it was created rather than the one where it is sitting.

    Is there something I can add to the [yasr_overall_rating size=”medium”] to be more specific about which post-id it relates to?

    Thanks.
    Jason K

    Thread Starter whatsworthseeing

    (@whatsworthseeing)

    OK – so I’ve just been playing around and I’ve realised that I can add postid=26 to the short-code and I get the right one – so my question is this…

    Can you think of a way that I can automate this, so that I don’t have to manually insert the postid on every post that I want to rate?

    Thanks!
    JK

    Thread Starter whatsworthseeing

    (@whatsworthseeing)

    Sorry – I keep thinking too much – if I have a way of automating the post-id, I’m guessing I might end up back where I started, with the shortcode taking its value form the page its sitting on, rather than the one it was originally attached to…?

    Plugin Contributor dudo

    (@dudo)

    Hi, sorry for the delay of this answer.

    As you guessed , the shortcode is already automated, if not specified, it takes the post id from the loop where it belong.
    If that plugin doesn’t use the loop, the shortcode will always take the post id from post/page.

    Best,
    Dario

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Stars in sidebar widget display rating from content post’ is closed to new replies.