How to get uLike HTML/markup via admin-ajax.php?
-
I’m using Javascript in the browser, and fetch comment data using:
jQuery.ajax({ url: wp.ajaxurl, data: { action: 'wp_ajax', data: data } })
And then I output the data. The problem is I only have the data, not the HTML that uLike adds to comments.
I think what I want is the
wp_ulike_comments
function, but that expects to be run inthe_loop
, because it usesget_comment_ID()
. Let’s say I fetch the comments from the database myself. How can I callwp_ulike_comments
and pass in an array of comments to get HTML back out?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to get uLike HTML/markup via admin-ajax.php?’ is closed to new replies.