Support

Account

Home Forums Add-ons Gallery Field Accessing images in a gallery on user profile from PHP Reply To: Accessing images in a gallery on user profile from PHP

  • @markargent could this help, How to get value from a user, ACF docs

    <?php
    /**
     * get current author, use this on single page
     */
    
    $author_id = get_the_author_meta('ID');
    $author_image = get_field( 'author_image', 'user_'.$author_id );
    $author_image_size = 'medium';
    ?>
    
    <?php if( get_field( 'your_field_image', 'user_'.$author_id ) ) : ?>
    	<?php the_field( 'your_field_image', 'user_'.$author_id ); ?>;"
    <?php endif; ?>>
    
    <!-- get just img with wp_get_attachment  -->
    <?php echo wp_get_attachment_image( $author_image['ID'], $author_image_size,"", array( "class" => "custom-class-name" ) ); ?>