• Resolved sunyplanet

    (@sunyplanet)


    Hello, I am trying to add average ratings on a specific post, but dynamically without hard coding post id in the shortcode for example: [wppr_avg_rating_post_id id='{postID}’]

    I am using a widget to display the shortcode so could you please provide any function I can add in my functions.php to achieve this.

    Thank you.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author shoaib88

    (@shoaib88)

    Hi,
    Try to use global variable $post to get post ID dynamically.
    Hope it will help.

    Thanks

    Plugin Author shoaib88

    (@shoaib88)

    If you want to add average rating on a specific post, you need to pass id of that specific post.

    Or if you want to show average rating with all post, you need to use [‘wppr_avg_rating’] shortcode to show average dynamically.

    Brad Dalton

    (@wordpresssites)

    Try this add_filter('widget_text', 'do_shortcode');

    Plugin Author shoaib88

    (@shoaib88)

    Hello @sunyplanet
    Hope you found the solution, so I am going to mark this issue as resolved.
    If you have any issue, please feel free to create a new support topic.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can I add average rating to specific post dynamically’ is closed to new replies.