I assume that you would be providing the author IDs in the widget options. And that the authors would be displayed in the order they were listed.
Assuming the input would be -> 3,10,12
You can have the following code to display the authors with that user ID in that order:
$user_ids = "3,10,12"; //this is assuming you already have the value stored in a variable
//convert the comma separated string into an array
$user_ids_array = explode(",", $user_ids);
//display the list of users
echo '<ul>';
foreach( $user_ids_array as $id ):
$user = get_userdata( $id );
echo '<li>'.$user->ID.' '.$user->display_name.'</li>';
endforeach;
echo '</ul>';
Related Posts:
- echo value from ‘select’ field type into page template using cmb2?
- Add custom meta box on Post page
- add_meta_box Callback not being called
- Plugin “Meta Box”: Implementing meta boxes in custom post type
- How WordPress autosave can save plugin fields?
- How can I filter the contents of a metafield before it’s displayed in the admin?
- Plugin allowing for artists, events and venues
- Security checking in meta_box save is reluctant?
- RW Meta Box ,Problem setting post title
- how do i remove posts from a WP_Query so the pagination is right?
- Saving Custom Post types and fields to a custom table
- dynamically generating plugin syntax
- Correct way to make meta box with more than one meta field secure
- get_post_type on post.php
- All of my custom posttypes are 404’ing
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- auto populate list of questions if user select a category xyz
- WordPress metaboxes – textfield suggestion automatically populated
- Redirect to another page using contact form 7? [closed]
- Custom Post Type Fields
- How to Resize the Custom Post Images?
- Amazon.com intergration with WordPress?
- Sticky option for custom post types without using custom fields or plugins
- Adding custom meta boxes to specified custom post type
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Price comparison table based on Custom Post Type?
- Show related posts based of current ACF field name in a single page post (a loop within loop)
- How can I store data from custom fields to custom tables?
- “After file loaded” action
- Dictionary-style definition list plugin
- How to create repeater field manually, without plugin (ACF Pro)?
- Error Metabox Warning: call_user_func() expects parameter 1 to be a valid callback
- Preset custom fields
- Register PODS Custom Field with WPGraphQL [closed]
- WordPress hide post from custom post-type on a single page
- Create multiple posts when a custom post is created
- How to pass multiple custom fields as shortcode’s parameters
- Simple Data picker meta box
- Do something with thumbnail image on post publish
- Add custom field for users
- Displaying image from a repeatable group
- How to add jquery to my custom post type wp plugin
- What method should I use for a sidebar widget that reads latest posts?
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- Extending a CPT by Created by another plugin
- A plugin for software reviews site like this one?
- How to change data format in custom meta box field [closed]
- Links not opening as they should. Custom WP plugin
- how to compare date meta value in jet smart filter Date query?
- Plugin not saving values when placed in a folder within /wp-content/plugins
- How to add the post ID (or any other post data) to a Contact Form 7 mail?
- Woocommerce with metabox plugin
- wordpress reusable content blocks
- Override plugin with functions.php
- Make the checkbox meta field checked by default
- Last modified field for user profile?
- Should i delete the posts created by a plugin on uninstall?
- Why do I lose the content of meta boxes when I leave the page?
- Advanced Custom Fields
- Dynamically add / duplicate custom meta in custom post types
- Allow users mark posts as “complete”?
- WordPress custom meta field for custom post not storing data
- WordPress CMB2 – Run function on save
- FacetWP group listings by custom field [closed]
- How to Duplicate (multiple meta box)?
- window.send_to_editor and jQuery .attr() conflicts with multiple custom upload image meta boxes
- Is there a way to order posts and custom post types as one group?
- List of Posts in a Custom Field
- How can i list random post from multiple category?
- Save an array from drop-down in custom meta box
- How does WP handle multiple matching rewrite rules?
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- Building a store locator with google maps
- Populate Custom Fields in a Custom Post Type?
- Custom Field Template seriously messed up in WP 3.1.1
- Duplicate posts when posting nulls in records in phpMyAdmin [closed]
- How to make wp_enqueue_style and wp_enqueue_script work only on custom post type
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- Accessing post’s meta data based on user’s click of a post
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Carbon Fields use in custom plugin class
- Not able to complete meta box save function and sanitization/validation
- How I can get custom field’s current value?
- UnWanted Custom field added in the wp page edit area
- Keep display metadata value on backend – Custom Metabox
- Woocommerce – How to populate custom select field with stored values on checkout page?
- How to check if user meta field is empty in conditional else statement
- Replace text in post from cvs
- Implement Autocomplete for a custom field on WordPress Plugin Frontend
- How to create user groups and allow custom posts and plugin modify/access to specific group?
- I want to extend the current themes’ single.php to display the meta fields of my CPT
- How to query the custom fields by language?
- Plugin custom post type – Internal server Error
- Exclude post by custom meta with pre_get_posts
- How can I create a custom shortcode that will return a custom post type by ID?
- Is it possible to create Custom Post plug-in?
- Why is my select meta data not saving?
- get_post_type() and WP_QUERY issue
- dynamically add a custom field or metabox to custom post type [duplicate]