• svbulba

    (@svbulba)


    My WP-template can list some posts by categories at one page, and if post presents in several categories it shows several times.

    postratings-js.js accesses element by ID, so only first element is interactive on mouse over.

    I just changed all in postratings-js.js:
    #rating_”+post_id+”_” -> img#rating_”+post_id+”_”
    #ratings_”+post_id+”_text” -> span#ratings_”+post_id+”_text”
    #post-ratings-“+post_id -> div#post-ratings-“+post_id (excepting post_ratings_el=jQuery(“#post-ratings-“+post_id) to prevent double/triple votes)

    So with this modification jQuery can return more than one element with same ID (though ID must be unique in valid html5, but seems it works fine in all modern browsers).

    Sorry, if it’s offtopic, not found where to place bug-reports for the moment.

Viewing 1 replies (of 1 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Yea, it is a technical limitation due to the age of the plugin and my technical capability at that time. Each post on the page has to be unique. Sadly there is no way around it besides to rewrite the plugin which I don’t have time to do.

Viewing 1 replies (of 1 total)

The topic ‘Wrong behavior if post is duplicated on page’ is closed to new replies.