Home › Forums › General Issues › Image field in admin section › Reply To: Image field in admin section
yes..i try this too. but same problem.
<?php
$args = array (
'role' => 'contributor',
'order' => 'ASC',
'orderby' => 'display_name',
);
// Create the WP_User_Query object
$wp_user_query = new WP_User_Query($args);
// Get the results
$authors = $wp_user_query->get_results();
// Check for results
if (!empty($authors)) {
echo '<div class="row">';
// loop through each author
foreach ($authors as $author)
{
// get all the user's data
$author_info = get_userdata($author->ID);
$image = get_field('image','user_' . $author->ID);
echo '<div class="col-md-3">
<ul class="list_detail">
<li> ' . $author_info->first_name . '
' . $author_info->last_name . '</li>
<li> ' . $author_info->settore . '</li>
<li> ' . $author_info->citta . '</li>
<li> <img src=" ' . $image . ' " /> </li>
<li> ' . $author_info->cellulare .' </li> </div>';
}
echo '</div>';
} else {
echo 'No authors found';
}
?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.