WordPress-Post-Like-System icon indicating copy to clipboard operation
WordPress-Post-Like-System copied to clipboard

How can I use ajax for this

Open aydcery opened this issue 8 years ago • 1 comments

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,

aydcery avatar Sep 08 '16 12:09 aydcery

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 ?

gulonline avatar Aug 30 '17 17:08 gulonline