The Avatar field can be added to Users. You will need to Extend the User object in WordPress with Pods to get access to this. Only one Avatar field can be added at a time.
Files uploaded to the Avatar field will override the get_avatar() result and any other place Avatars are used in WordPress.
Contents
Quick Start
- Fill out the Basic Field Settings (Label, Description, and Field Name)
- Select Field Type: Avatar.
- Click Save New Field (or Save Field if you’re updating an existing field) to save your field configuration.
Settings
This field type uses the same options as the File / Image / Video field type.
How to Display
When displaying relationships, it will always display the label/title of the related item. When using multiple select, Pods will automatically output the list in a readable format using the Oxford Comma like: Option One, Option Two, and Option Three.
By default, Pods will not link to the related object URLs when displaying. If you want to do this, you can look at field() or using [each].
Display with get_avatar( $id_or_email, $size = 96 )
<?php // Output the avatar for the current post author as a 150x150 image. echo get_avatar( get_the_author_meta( 'ID' ), 150 ); // Output the avatar for the $user_ID as a 32x32 image. echo get_avatar( $user_ID, 32 ); // Output the avatar for the $user_email as a 100x100 image. echo get_avatar( $user_email, 100 );
Display with a Shortcode
[pods field="avatar"]
Display with PHP: pods_field_display()
<?php echo pods_field_display( 'avatar' );
Display with PHP: $pod->display()
<?php $pod = pods(); echo $pod->display( 'avatar' );