WordPress-Post-Like-System
WordPress-Post-Like-System copied to clipboard
How can I use ajax for this
hi, very nice addon I love it and I am using this code to display users who liked post ,
$userlikes = get_post_meta( get_the_ID() , '_user_liked', true );
if ( ! empty( $userlikes ) ) {
$user_query = new WP_User_Query( array( 'include' => $userlikes, 'number' => 4, 'order' => DESC, ) );
}
// User Loop
if ( ! empty( $user_query->results ) ) {
foreach ( $user_query->results as $user ) {
?>
<span><?php echo $user->user_login; ?></span>
<?php
}
}
but need to refresh page to see new users who liked, I need little help to use ajax display this result, without refresh page,
hi , i tried this and its working fine, can you please help me to get user name with user profile url? can you please tell me how to get user url with your this code ?