Support » Plugin: Like Button Rating ♥ LikeBtn » Getting LikeBtn to work with Events Calendar template list

  • Resolved databell96


    I’m trying to use LikeBtn to display likes for various posts and events on my site. For the most part, it works, but on the example link I’m providing, clicking any like button give a like to all the buttons on the page.

    Let me explain what I’m trying to accomplish. I’m pulling events from the Events Calendar using a custom template and placing a custom design for my like buttons in a div for each events like this:

    <div class="entry-footer-left">
    <!-- BEGIN -->
    <span class="likebtn-wrapper" data-theme="custom" data-icon_d_c="#ffffff" data-icon_d_c_v="#ffffff" data-label_c="#ffffff" data-label_c_v="#ffffff" data-counter_l_c="#ffffff" data-counter_d_c="#ffffff" data-bg_c="#363636" data-bg_c_v="#5c1e1e" data-i18n_like="Likes" data-ef_voting="push" data-identifier="btin-dvlike" data-dislike_enabled="false" data-icon_like_show="false" data-icon_dislike_show="false" data-counter_clickable="true" data-counter_zero_show="true" data-counter_count="true" data-popup_position="right" data-loader_show="true" data-site_id="4ca3cd8a943ec4c42a5fa684"></span>
    <script>(function(d,e,s){if(d.getElementById("likebtn_wjs"))return;a=d.createElement(e);m=d.getElementsByTagName(e)[0];a.async=1;"likebtn_wjs";a.src=s;m.parentNode.insertBefore(a, m)})(document,"script","//");</script>
    <!-- END -->

    So all my events have the like button but they all act together, instead of individually. I used this previously with WP U Like and this did not occur, but we didn’t like the overall functionality and styling of that plugin. Can you tell me if there’s a way to make this work where all the like button act and respond individually?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • It looks to me like the data-identifier has to be unique for each post, but how can I do that dynamically in my template?

    Never mind. I figured it out. It was this code was needed for the data identifier:

    data-identifier="post_<?php the_ID()?>"

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting LikeBtn to work with Events Calendar template list’ is closed to new replies.