-
Notifications
You must be signed in to change notification settings - Fork 17
Description
@john970473 We can continue the discussion here
Someone asked me how to add LikeCoin to the widget. I have tried to add the shortcode on the text widget but I failed because "likecoin_add_likebutton()" is just for posts or pages. Therefore, we could change the function and add the button to the widget.
At this moment, I could only add Javascript to the widget, but the style of the button looks not so good.
You can see the widget of my blog : https://www.johntool.com.
I think the button is too small, and I have to split url and add to link.
I think we can refactor a bit and let likecoin_add_likebutton() accept a $post or $likerId.
Then from inside a widget we can use get_queried_object to get the $post id/object.
For cases other than a post, we can use the site LikerId ($option[ LC_OPTION_SITE_LIKECOIN_USER ]) if it exists, and probably just hide the widget if it is not.
Did I get your idea right?