Home Forums WTI Like Post PRO vote button code

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #311
    RayJay
    Participant

    Hi guys,

    I have a custom template showing custom post types… that members have voted on…

    I’d like to apply your code to my custom button, so other members can also vote directly from the list… please tell me what I can add to my buttons to allow a vote, and for that vote to track properly in the wti system…

    Thank you!

    a

    #312
    RayJay
    Participant

    Could it be something like this? (this doesnt work but I think I’m close…

    <div id="votethumb" class="button"><input type="submit" name="1" value="1"><span>VOTE</span></></div>

    #313
    Webtechideas
    Keymaster

    The best way to get these things is to look into the codes.

    For like button, it should be something like
    <a rel="nofollow" data-nonce="{$data_nonce}" data-post_id="{$post_id}" data-task="like" class="lbg-style1 like-{$post_id} jlk"><img title="Like" src="{$image_url}"><span class="lc-{$post_id} lc">{$like_count}</span></a>

    For unlike button, it should be something like
    <a rel="nofollow" data-nonce="{$data_nonce}" data-post_id="{$post_id}" data-task="unlike" class="unlbg-style1 unlike-{$post_id} jlk"><img title="Unlike" src="{$image_url}"><span class="unlc-{$post_id} unlc">{$unlike_count}</span></a>

    The variables are self-explanatory. If you want to use the plugin buttons, then <?php GetWtiLikePost(); ?> will do the job for you.

    Thanks

    #320
    RayJay
    Participant

    Thank you so much! Is this how I implement or do I also need to call a function before the loop? Sorry, new at custom template pages….

    <div id="votethumb" class="button"><a rel="nofollow" data-nonce="{$data_nonce}" data-post_id="{$post_id}" data-task="like" class="lbg-style1 like-{$post_id} jlk"><span class="lc-{$post_id} lc">VOTE</span></a></div>

    I am SO close to launching my project… and I very much appreciate your help.

    a

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘WTI Like Post PRO’ is closed to new topics and replies.