• thehalogod

    (@thehalogod)


    PollDaddy offers a free rating code thing that works in WordPress and the support documentation can be found here:

    https://support.polldaddy.com/rating-widget/

    So based on that support doc, I created my rating code from within my polldaddy account (found here):

    https://polldaddy.com/ratings/list-ratings.php

    This is the code I ended up with from creating my rating code and then modifying it based on the first URL I supplied above so that it would work with all posts on my blog and not just one:

    <div id="pd_rating_holder_810655"></div>
    <script language="javascript" type="text/javascript">
    PDRTJS_settings_810655 = {
        "id" : "810655",
    "unique_id" : "wp-post-<?php echo( $post->ID ); ?>",
    "title" : "<?php echo( $post->post_title ); ?>",
    "permalink" : "<?php echo( get_permalink( $post->ID ) ); ?>"
    };
    </script>
    <script type="text/javascript" language="javascript" src="https://i.polldaddy.com/ratings/rating.js"></script>

    But for some reason it’s not displaying correctly on my site. Does anyone have experience with this nero rating code as they call it?

    Here is an example of a site using it exactly how I want to:

    https://wedinator.com/

    Advice?

Viewing 1 replies (of 1 total)
  • I had the same problem, but I got it working when I changed the div id:s to be unique.
    The following code should work in your case, you can put it both in the loop (index.php) and on the individual page (single.php):

    <div id="pd_rating_holder_810655_<?php echo( $post->ID ); ?>"></div>
    <script type="text/javascript">
    PDRTJS_settings_810655_<?php echo( $post->ID ); ?> = {
    	"id" : "810655",
    	"unique_id" : "wp-post-<?php echo( $post->ID ); ?>",
    	"title" : "<?php echo( $post->post_title ); ?>",
    	"permalink" : "<?php echo( get_permalink( $post->ID ) ); ?>",
            "item_id" :  "_<?php echo( $post->ID ); ?>"
    };
    </script>

    And somewhere in the footer you can put

    <script type="text/javascript" language="javascript" src="https://i.polldaddy.com/ratings/rating.js"></script>

    Good luck!

Viewing 1 replies (of 1 total)
  • The topic ‘PollDaddy Thumbs up / Thumbs down code / plugin’ is closed to new replies.