According to the code samples in the article _user_liked
post meta should hold all the user ids of those who liked it. Something like this should be able to solve it for you
<?php
$post_id = get_the_ID();
$users_liked = get_post_meta( $post_id, '_user_liked', true );
if ( '' !== $users_liked && ! empty( $users_liked ) ) {
?>
<ul>
<?php foreach ( array_values( $users_liked ) as $user_id ) :
$user = get_user_by( 'id', $user_id );
if ( false === $user ) {
continue;
}
?>
<li><?php echo $user->user_login; ?></li>
<?php endforeach; ?>
</ul>
<?php
}
Related Posts:
- Using register_activation_hook in classes
- How to use multiple query with same meta key
- How to use WordPress (PHP) functions in AngularJS partials files?
- How to create a custom config file and get data using inline JS in a wordpress page
- How to Remove a Filter from the Admin List Table?
- Replacing the NavWalker dropdown element
- Remove commas from WooCommerce checkout addresses fields
- Getting the dropdown menu to redirect to different pages?
- Different background-image by category
- enqueue multiple Google fonts with multiple weights and styles (italic)
- Get taxonomy terms only of the WP_Query current posts
- How to display user nickname (not display name) in PHP template?
- Extract subdomain and relative address from a url
- Custom Template 404 for specific custom post type
- Accessing site’s root from themes folder
- Passing PHP Function Arguments from CLI vs URL
- tracking number field in Woocommerce order [closed]
- Count top level menu items
- Is_template how to add one more template [closed]
- How to complete two other input fields, completed the first
- Why ajax doesn’t work on certain wordpress hooks and reload the page instead?
- Remove the first 5 characters of the_title and orderby that
- How to modify URL (add GET values) after front end form submission?
- How to add a do_action on refreshing of WP customizer?
- Replacing mysql_escape_string in a custom plugin when moving to PHP7
- Error: options page not found
- WordPress displaying content from sub pages
- jQuery code not working when included in functions.php
- Widgets in the loop if active
- Blob file download problem
- Fatal error: Call to undefined function register_new_user()
- Remove the More Link
- Removing the first 8-10 letters from a post?
- How to display SQL query that ran in WC_Order_Query?
- Delete database record using plugin from admin panel
- Post not populating for custom post type based on category selection
- How to display success message correctly and delete it when the page is refreshed
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- Posts are not looping through correctly
- get db values for external js file
- How to exclude a widget from W3 Total Cache Plugin
- form $_post action value gets truncated after it passes through two forms
- WordPress the_content Page Load
- How to echo the_title from an array of posts?
- WordPress -> If Is Role Subscriber Show Image?
- Using color schemes with Color Picker
- What should I write in the post action of this front end post form?
- How to split AJAX response into two divs
- Deleting expired session tokens in WordPress
- How to set variables with AJAX request to use in another function in WordPress
- Payment field disappears on custom Paypal plugin
- Creating a brand attribute as a variable
- Illegal string offset in PHP function in via Theme Customizer
- How to hide the file name of 404.php in URL?
- when hooking to pre_user_query my wordpress crashes when using very simple commands?
- Loop for recently (updated_post_meta) posts?
- I am having errors with checkout on wordpress
- Display articles with a different template in the home page | Solved |
- How to retrieve quantity input field by id in woocommerce
- How to use Multi SQL Database in WordPress?
- My single.php page skips the first div tag
- Help me understand how Search function works using dynamic_sidebar()
- How to display post meta bellow every posts
- Sudden Upload HTTP errors, PHP uploads and memory limits are already to high to my taste. Anything else?
- form submission reverts to index.php template
- Hide a specific category title from displaying on site
- Searching a custom WP table and displaying results in an HTML table
- Handling form actions in WordPress
- i want add conditional for add category in wordpress
- Return to the beginning of the results of a for loop
- Obtain wordpress user role
- Shortcode’s output to use as other shortcode’s parameter
- PHP code printed into CSS classes
- Thumbnail wouldn’t scale to size properly
- Scheduling a post using publish date from a custom field. Resulting post is set as published in the future instead of scheduled
- How to hook into the subscriber /wp-admin/index.php page?
- What syntax is this? “{{post.price}}”
- PHP script to redirect traffic based on website accessed
- How to remove title tag with this filter
- How to handle the structure of page/taxonomy/post without making wordpress get confused with the url
- Add two or multiple functions in WordPress Post or Page
- direct query to post_meta table
- Can’t put a hyperlink on Featured Post’s Image
- special characters not supporting in wordpress
- Custom user roles doesn’t apply changes
- A Space being added to url generated by custom plugin
- Why this plugin is not working?
- WP Simple Fields – Single repeatable field inside repeatable field group
- get_post_meta is always empty when I use wp_mail
- How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?
- Incomplete term slugs output from a foreach loop with get_the_terms
- Custom Shortcode with Dynamic Button
- Upgrade wordpress core programmatically with PHP [closed]
- Too many if’s and else if’s ?? – Must be better way [closed]
- Query posts by custom taxonomy slug in WP REST API?
- oneOf JSON Schema validation not properly working for custom post meta value?
- WooCommerce Modal Fly cart on add to cart – With AJAX
- /page/2/ redirect to 404
- How can I trim /page/ URL with PHP in WordPress
- Adding date and time to the same request