$thevoters_ids = get_post_meta( get_the_ID(), "thevoters", true ); // get a comma separated list of ids
$thevoters_ids = explode( ',', $thevoters_ids ); // turn the list into an array
foreach ( $thevoters_ids as $thevoter_id ) { // loop through the ids
$thevoter = get_user_by( 'id', $thevoter_id ); // get the user object by id
echo $thevoter->display_name; // display the user name
}
Related Posts:
- Add options to featured image
- Change meta tags programatically
- Use a function to update post meta based on other post meta
- update_post_meta for custom field not working upon form submission
- Assign category using custom field?
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Move Post to different category if post_meta field is 0 or is 2 days old?
- What WordPress function to use to get meta value by using meta keys?
- Default Custom Field Value Automatically Update
- Post meta not updating
- Function to update post_meta based on existing post_meta
- Exclude from the query posts with meta_key and meta_value
- Prevent custom field from being updated after first publish
- Get array of metakey in all posts
- User function to return multiple get_post_meta()
- What are the meta fields for an attachment?
- How to avoid saving empty data to sql while using add_meta_box
- How to change text color depending on the number value (Using javascript)
- How to add custom metakey to shop_order page’s searching function?
- Update wp_postmeta table based on 2 keys
- blank page with wp_get_attachment
- Reference multiple style sheets, clearing styles for permalink page, custom fields for css
- How To Display Author Popup on Entry Meta (Genesis Framework)?
- Creating a “Related Meta” type field?
- Remove post from latest posts after a month only with certain tag
- save_post doesn’t correctly process function call with php class
- Return ACF Field value function
- update_post_meta not working in function
- How To Get WordPress Categories Last Update Date?
- How to add a meta information to the URL?
- Automatically add custom fields (post_meta) to all published posts, hourly, via wp_cron?
- update_post_meta after form is submited
- Add custom fields after post/page title
- Display post_meta-by_key on product catalogue
- How to save custom made object in an array in a post meta field
- Adding and updating repeating custom field meta data
- How to add a data attribute to a WordPress menu item
- Order posts (across the whole site) by metadata date
- Disable visual editor on one specific page
- How to display random users with avatars
- Can the wp-plugins (Must Use Plugins) URL be targeted for use in functions.php?
- In a WordPress plugin, how do you output HTML code inside the DOM header? [closed]
- Detect meta value changes when post is updated (post_updated)
- Different ‘WP_CONTENT_URL’ for different subsites in Multisite setup?
- Removing Unnecessary Text from Admin Menu without CSS
- Display WordPress Search
- Preferred Use of home_url()?
- Where does function_exists() look to decide whether a function exists? [closed]
- Get page slug and assign a variable within functions.php
- Multisite, either change the name of sample-page or create new page
- What is the “icon” parameter in wp_get_attachment_image_src used for?
- How to use thumbnails in gallery?
- Hide Author.php template from specific user role
- Customizer field value into functions.php variable
- wp_insert_posts keeps adding multiple pages
- Best practice when altering a parent theme function inside a child theme?
- list tags with count in author profile page
- Breadcrumbs – Exclude Child Categories
- Running a script before absolutely everything
- Auto delete post if certain custom field data is empty
- using `require` in my functions.php breaks the site
- Is it OK to include files using ABSPATH?
- Limit length of first excerpt in the loop
- check if the user is owner of current page
- How to set the default avatar of buddypress avatar [closed]
- attachment page template? only show attachments for current post?
- Conditional statement not working in function
- Adding code before post title with the_title produces weird results
- Remove the month and year from a WordPress Date?
- How to insert class in each list of categories?
- Editing the formatting.php file vs functions.php file?
- How to make a new function that includes a template
- Function not saving unchecked checkbox
- Removing parent theme CSS without editing parent theme
- Entirely Different Functions.php per Page?
- Why is this function crashing my wordpress installation? [closed]
- Can I use ‘Featured Image’ as a hero image and a thumbnail?
- How to Override Page Template if URL matches query?
- Woocommerce Display Discount On cart
- How to offset main query without affecting other queries and backend
- ACF Date Form in Custom Admin Field
- Function to disable “href” anchor tags that contain “a data-name” on mobile only
- Execute jQuery with custom event listener after successfully add an item to the cart
- WordPress hooks to call a function inside a construct
- WordPress undefined function error on using add_action() in functions.php
- How to create admin ajax function for my contact form
- how to display featured image for single post for a specific category
- Database Query not working
- Can’t wrap my head around this function – any help would be appreciated
- Figure inlined width trigger distorted layout
- save_post hook – headers already sent?
- Exclude javascript in certain page url and all following url’s after forward slash
- How to use WP_rewrite?
- Wp get archive only text not link
- can not call functions in function.php
- Custom shortcode not being included in content paragraph [duplicate]
- What are the parameters are used in add_action and filters?
- Which template file to edit to edit homepage in Mystile [closed]
- Does functions.php apply to every page?
- Setcookie not setting cookies anywhere except admin