Title: Possible issue/bug
Last modified: August 21, 2016

---

# Possible issue/bug

 *  Resolved [Hemant Nandrajog (instruite)](https://wordpress.org/support/users/instruite/)
 * (@instruite)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/possible-issuebug/)
 * Hello,
    First of all Thanks for the nice plugin have been using it for ages.
 * Just wanted to let you know that the rating does not work for individual images
   in a gallery
    After a bit of debugging found the culprit to be _global $id_ in
   _function the\_ratings_ seems like it always return 0 for image posts (single
   image displayed as post). For time being I am using the following temporary solution
 *     ```
       if ($id == 0)
       	{
       		$id = get_the_ID();
       	}
       ```
   
 * Thanks,
    Hemant
 * [http://wordpress.org/plugins/wp-postratings/](http://wordpress.org/plugins/wp-postratings/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/possible-issuebug/#post-4463209)
 * Thanks! Will add it in, [https://github.com/lesterchan/wp-postratings/issues/18](https://github.com/lesterchan/wp-postratings/issues/18)

Viewing 1 replies (of 1 total)

The topic ‘Possible issue/bug’ is closed to new replies.

 * ![](https://ps.w.org/wp-postratings/assets/icon.svg?rev=978014)
 * [WP-PostRatings](https://wordpress.org/plugins/wp-postratings/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-postratings/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-postratings/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-postratings/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-postratings/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-postratings/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/possible-issuebug/#post-4463209)
 * Status: resolved