WordPress-Post-Like-System
WordPress-Post-Like-System copied to clipboard
changing icon position, etc.
I'm trying to change the icon position so it's to the right of the "Like" text. I modified the $output
so it's wrapped in a <div>
instead of a <span>
and I'm using my own custom icons.
I also changed the $output
so it's $count . $icon
, which displays correctly by default, but when clicked it moves the icon back to the left when it shows the count.
Is there something else that needs to be modified to keep the icon on the right?
I don't see the "Unlike" text. Is that setup only for comments?
I'd also like to show the likes count by default, even if someone hasn't liked it yet.
Is it possible to show it as: Like Text -> Icon -> Count, and if it has been liked: Unlike Text -> Unlike Icon -> Count ?
Alternatively (and probably best) would be to just show the like count above this button, such as "xxx people like this" and then below I'd have the like button with Like Text -> Icon and when clicked it would show Unlike Text -> Unlike Icon without the loading text popping up. Either way, need the icon on the right ;)
any info is appreciated, and thanks for the cool tool 👍
p.s. I'm not a programmer so maybe I'm just missing the obvious stuff in the code after 18 hours of work.
Your php is right but you must change javascript file too. var count = response.count; var icon = response.icon; allbuttons.html(count+icon);
make icon+count to count+icon its will be fix.