Choose from a list of users in the Admin area (2 posts)

  1. kevleitch
    Posted 2 years ago #


    I'm trying to create a 'featured author' functionality on my site wherein an administrator can select a featured author from all the authors on the site. Ideally this would be in a dropdown select box but I'm open to suggestions.

    Is this possible?

    Thanks for any help,


  2. Fresher
    Posted 2 years ago #

    Yes you can do this :)

    create the custom field for each user profile to make it as radio button or text field by this you can fetch and show which user is featured author.

    function modify_contact_methods($profile_fields) {
    	// Add new fields
    	$profile_fields['twitter'] = 'Twitter Username';
    	return $profile_fields;
    add_filter('user_contactmethods', 'modify_contact_methods');

    retrieve the value as something like here

    $twitterHandle = get_the_author_meta('twitter');

    For your reference

Topic Closed

This topic has been closed to new replies.

About this Topic