Apps Ballance Cash_2 Chat Checkout Click Code Cog_Wheels Compose_email Conference Contacts Earth Edit_File_1_ Email Email_2 File Folder_2 Gift Group Group_2 Help ID ID_2 Key Keys Laptop_Store Like_1_ Link Lock Log_Out Map Marketing Mobile_UI Navigation POS Partnership Profile Safe_2 Search_User Secure_Files Settings Share Shield Shield_2 Shopping_Cart Support_Male Trash Type_pin User_female User_male logo copy


Iain Poulson avatar
Iain Poulson Last updated on January 2, 2023

The WP User Manager Likes addon has some functions that can be used in templates to access certain data.

wpumli_get_likes_count( $post_id )

This function will return the number of likes a piece of content has, when supplied with the ID of that post, page or custom post type.

wpumli_get_likes_by_user( $user_id, $post_type = null )

This function will return an array of post IDs for the content a user has liked. You can optionally pass a post type string to only get the likes for a specific post type.

wpumli_get_users_who_liked_post( $post_id )

This function will return an array of user IDs who have like a piece of content.

wpumli_get_liked_posts_for_profile( $user_id, $post_type = null )

This function returns the liked content for a user and is used to render the profile content on the Likes tab. It is pluggable so you can overwrite this function in your own code.

WP User Manager logo

Get Started with the Best WordPress Membership Plugin Today

Connect, Manage and Build your Membership Site

Need more help?

If you still didn't find an answer you can always contact us

Submit a ticket