Avatar Field

Extends User Profile with a Gravatar field that is managed under the Media Library as opposed to using Gravatar.com

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.

Quick Start

  1. Fill out the Basic Field Settings (Label, Description, and Field Name)
  2. Select Field Type: Avatar.
  3. 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' );

Other Helpful Documentation on Working with Fields in Pods

Code (Syntax Highlighting) Field

The Code (Syntax Highlighting) field is used for multiple line code content.

Color Picker Field

The Color Picker field is useful in situations where a color needs to be able to be chosen and customized.

Conditional Logic for Fields

Conditional Logic for Fields will allow you to show or hide a field based on the value of another field.

Currency Field

The Currency field is used to store numeric, integer, and float currency amounts.

Date / Time Field

The Date / Time field is used to store a date and time value with an easy to use date / time input.

Date Field

The Date field is used to store a date value with an easy to use date input.

Date time fields redirect

Email Field

The Email field allows you to store email addresses with additional validation checks.

File / Image / Video Field

The File / Image / Video field is used to store a relationship to Media attachment(s).

Heading Field

The Heading field is not a normal input field, it will output Heading text between your normal form fields to help organize the form.

HTML Content Field

The HTML Content field is not a normal input field, it will output as HTML itself between your normal form fields to help organize the form.

oEmbed Field

The oEmbed field is used to store a single URL that will use the oEmbed protocol to display remote content.

Password Field

The Password field is used to store single-line text with a basic password input form field.

Phone Field

The Phone field is used for telephone numbers in various formats.

Plain Number Field

The Plain Number field is used to store numeric, integer, and float values.

Plain Paragraph Text Field

The Plain Paragraph Text field is used for multiple line text values.

Plain Text Field

The Plain Text field is used for Simple Plain Text Values like a first name, last name, alphanumeric ID or value.

Relationship Field

The Relationship field is used to store related items on various objects in WordPress.

Settings: Advanced

Provides access to the Advanced field options when editing a field.

Settings: Field Details

Basic Field Settings (Label, Name, Description and Field Type) that apply to all Fields created in Pods.

Settings: Reserved List of Names

There are certain names you cannot use for Pod, Group, or Field names in Pods because they are reserved in WordPress or Pods for other uses.

Simple Repeatable Fields

Simple Repeatable Fields will allow you to repeat many different types of fields.

Time Field

The Time field is used to store a date value with an easy to use time input.

Website Field

The Website field is used to store a URL or Website Address or Link to a Website.

WYSIWYG (Visual Editor) Field

The WYSIWYG (Visual Editor) field is used for multiple line HTML content.

Yes / No Field

The Yes / No field offers customizable labels and display options for checkbox, radio buttons, or a drop-down input.