November 1, 2016 at 1:18 am #458November 1, 2016 at 2:44 am #462WebtechideasKeymaster
Please find our input below.
1. Custom icons: We use anchor tag with all the attributes related to like/unlike activities. Within anchor tag, we use thumb image followed by a span to show the count. So you will have to use the following attributes for post id 7.
data-post_id="7"=> dynamic post id
data-nonce="1574511354"=> dynamic wp nonce
The span will be like this
<span class="lc-7 lc">0</span>. Here like, lc refer to like thumb. For unlike thumb, they will be unlike, unlc respectively.
2. The function used to get the users list is
GetWtiUserLikes. So you can refer to this and implement according to your need.
3. We are already in the process of implementing the number of users setting to show. We are currently showing the latest users first. We will add the random users functionality.
ThanksNovember 1, 2016 at 5:20 pm #463
Thanks for the quick response!
1. I’m wondering if perhaps you misunderstood what I am doing, because this does not pertain to a specific post. I have used the GetWtiLikePost(); function in my single post template to manually place the like functionality. I have hidden the default images (from your plugin) and also have disabled the native css. So the only thing displaying right now from the plugin is the like count, which is also clickable to like the post.
I have placed my own custom icon (using an icon-font) to the left of the like count. What I want to do is make that icon clickable to like the post, just like clicking on the count would do. This way the user can click either the icon or the count to like the post (just like they can do with your default images). But this isn’t for a specific post. It’s for the post of the page the user is looking at. Remember, I’m working in my single post template which applies to all posts.
2. Thank you for letting me know that function. I’ll try placing that today to see if it works as expected. If I have any issues I’ll let you know.
3. That is great news and thank you for taking my suggestion! Yes, I think it’s a good idea to have a setting that controls the loading order, especially when someone is limiting the number of avatars. If for example it is set to only display 10 avatars, it may be advantageous to have it load randomly each time. I’d give the choices of random load, latest likes first, or oldest likes first.
~ MichaelNovember 1, 2016 at 7:56 pm #464
Please read my post above first…
Regarding #1, I’ve been trying to get this to work on my own using the following code:
<a class="lbg-style-1 like-<?php the_ID(); ?> jlk" data-task="like" data-post_id="<?php the_ID(); ?>" data-nonce="<?php echo $data_nonce; ?>" rel="nofollow"><i class="lc-<?php the_ID(); ?> lc erudites-icon dashicons dashicons-thumbs-up"></i></a>
Unfortunately the problem here is the $data_nonce. No matter what I do this variable will not work, and just leaves the nonce blank. I’ve also found that with the above code if I click on my custom icon it will print a new like count on the screen (which displays right next to the native count as a duplicate). Obviously I just want clicking on the icon to increase the native count used by the plugin, and not to create another count on the screen.
I’ve checked the rest of the variables and they are all working. But at this point I am stuck.
~ MichaelNovember 1, 2016 at 8:37 pm #465
Sorry for yet another consecutive post (we’re obviously in different time-zones)… Please read my posts above first.
I’ve been trying to get the avatars to appear on the post pages without success. This is the code I’m using in my single post template:
<div class="wti-user-likes wti-likes-<?php the_ID(); ?>"> <?php GetWtiUserLikes(); ?> </div>
When the page loads there is simply nothing inside of the div with this code. I’m obviously doing something wrong. I also had a thought, that I’d like each avatar to be linked to the respective author page. This is really something that the plugin should do by default (perhaps with an option).
~ MichaelNovember 2, 2016 at 4:49 pm #466
I was hoping to have received a response from you today so I can complete this project. I’d greatly appreciate your help asap…
~ MichaelNovember 2, 2016 at 5:19 pm #467WebtechideasKeymaster
Can you please share your site url so that we can have a look at the issue? Also send your files (complete theme) so that we can install and check your code.November 2, 2016 at 7:00 pm #468
I just sent you a response via email. I need to reply via email at this point for privacy concerns.
- The forum ‘WTI Like Post PRO’ is closed to new topics and replies.