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
- Tips for using WordPress as a CMS? [closed]
- Edit Imported advanced Custom Fields from wordpress Dashboard
- How to make a list of companies’ information and display them to user, using custom post types and a custom taxonomy?
- Using ‘strtotime’ function to convert a custom-meta-box to a date-stamp
- add_meta_box: Datepicker like the one for postdate?
- [Plugin: Posts 2 Posts] reciprocal connections
- Custom options page checkbox will not save, despite working with text
- Upload files programmatically to users
- Admin Dashboard with Custom Tab for Client
- Plugin not saving values when placed in a folder within /wp-content/plugins
- Woocommerce with metabox plugin
- wordpress reusable content blocks
- Dynamically add / duplicate custom meta in custom post types
- 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
- UnWanted Custom field added in the wp page edit area
- How to query the custom fields by language?
- List taxonomy terms for post as checkboxes
- Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)
- Metabox not show in categories custom post type cmb2
- Repeatable Fields Metabox with Textarea (or wp_editor)
- How to use TinyMCE Editor for one of my custom post meta field?
- Custom fields for custom post type
- Create metaboxes based on custom post type
- Date format – Meta Box plugin
- Adding class to last list item? Not WP generated
- Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme
- CMB2 metabox create select with list of post from CPT
- Custom post types, disable fields
- WP-API Custom Post Type json_no_route
- Plugin generated unexpected output – No PHP errors
- Including content from legacy app: via plugin or custom content?
- Adding custom Field To The Posts Listing
- Table of contents (TOC) plugin is not showing header tag
- Create category for each user
- custom post type plugin error [closed]
- get_post_meta shortcode returns empty field
- Merging new theme and plugins from development site to production
- Is it possible to customize a wordpress post from outside dashboard(Something like site.com/post-type/post/?e=post_id)?
- Add_Meta_box to custom page (formidable edit post)
- Custom Fields as Post Type Options
- Calling an custom field from theme option at the frontend
- WordPress Custom post type won’t save properly
- loop through custom post-type with two meta_keys
- Is there a way to add a custom input field for every taxonomy term in WP post editor?
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- Woocommerce custom fields
- WordPress show different custom post type
- add_meta_box showing blank screen in my page
- How to make content as required in custom post type?
- How to consume external API from WordPress post editor and display the response data in the custom field?