Text, Text Area:
The value should be a string. For example: 'Lorem ipsum dolor siamet.'
WYSIWYG Editor:
The value should be a string that can contain HTML code, e.g. for text styling and linking. For example: 'The tone of his speech was <strong>fiery</strong>... as he stood by his firm believe that all men deserves the same, basic human rights, as enshrined in the <a href="https://www.un.org/en/about-us/universal-declaration-of-human-rights" target="_blank">Universal Declaration of Human Rights</a>.'
File / Media:
The value can be one of the following:
• An integer or string of the attachment ID. For example: 234 or '234'
• A string of the file / media URL. For example 'https://www.wpase.com/wp-content/uploads/2023/08/mi_dr1_scene4.jpeg'. The media will be sideloaded and a new attachment will be created for it.
Gallery:
The value can be one of the following:
• A string of comma-separated attachment IDs. For example: '8654,8652,8650,8648,8646,8644,8653,8651,8649,8647,8645,8643' or '8654, 8652, 8650, 8648, 8646, 8644, 8653, 8651, 8649, 8647, 8645, 8643' (with spacing after commas).
• An array of integers or strings of attachment IDs. For example: array( 8654, 8652, 8650, 8648 ) or
array( '8654', '8652', '8650', '8648', '8646', '8644' ).
• An array of strings of image URLs. For example: array( 'https://www.wpase.com/wp-content/uploads/2023/08/mi_dr1_scene2.jpeg', 'https://www.wpase.com/wp-content/uploads/2023/08/mi_dr1_scene4.jpeg', 'https://www.wpase.com/wp-content/uploads/2023/08/mi_dr1_scene5.jpeg' ). The images will be sideloaded and new attachments will be created for them.
True / False:
For True (checkbox is checked), the value should be the integer 1, the string '1', the string 'true', or the boolean true. For False (checkbox is unchecked), the value should be the integer 0, the string '0', the string 'false', or boolean false.
Radio:
The value should be the value or label set in the radio field settings. For example: 'pg' or 'Parental Guide (PG)' if the option is set to pg | Parental Guide (PG) (value | label pair) in the settings, or 'Parental Guide (PG)' if the option is set to Parental Guide (PG) (value only) in the settings.
Select / Checkbox:
The value can be either of the following:
• A string of a single value or label. For example: 'ai' (value) or 'Artificial Intelligence' (label).
• A string of comma-separated values or labels. For example: 'soccer,basketball,swimming' (values) or 'soccer, baskeball, swimming' (values, with spacing after commas), 'Soccer,Baskeball,Swimming' (labels), or 'Soccer, Baskeball, Swimming' (values, with spacing after commas).
• An array of values or labels. For example: array( 'soccer', 'basketball', 'swimming' ) or array( 'Soccer', 'Basketball', 'Swimming' ).
Hyperlink:
The value can be one of the following:
• A string of comma-separated values for URL, text and target. For example: 'https://www.google.com,Google,none'
• An array of URL, text and target values. For example: array( 'url' => 'https://www.google.com', 'text' => 'Google', 'target' => 'none', ).
• Only a string of the URL, e.g. 'https://www.google.com'. The text will be set to the URL and the target to none.
Number:
The value should be a string, integer or float of the value. Do not add thousand separators. Use dot for comma separator. For example: '250'
, 1500, or 9999.99.
Date:
The value should be a string of a valid
PHP date format. For example:
'2025-01-01' (Y-m-d) or
'December 31, 2025' (F j, Y).
Time:
The value should be a string of time value in either one of these
PHP time formats:
• G:i (24 hours). For example:
'7:30' or
'21:30'• H:i (24 hours). For example
'09:30' or
'21:30'• g:ia (12 hours). For example
'9:30am' or
'7:45pm'• g:i a (12 hours). For example
'9:30 am' or
'7:45 pm'• g:iA (12 hours). For example
'9:30AM' or
'7:45AM'• g:i A (12 hours). For example
'9:30 AM' or
'7:45 AM'• h:ia (12 hours). For example
'09:30am' or
'07:45pm'• h:i a (12 hours). For example
'09:30 am' or
'07:45 pm'• h:iA (12 hours). For example
'09:30AM' or
'07:45AM'• h:i A (12 hours). For example
'09:30 AM' or
'07:45 AM'Note that
the value you use should be availabe as an option in the time field dropdown.
So, for example, you will need to set the
Step to
5 minutes in the time field settings if you want to use something like
'19:45', so that the time field dropdown will have 19:40, 19:45, 19:50, etc. as options.
Or, the
Step should be set to
1 minute if you want to use something like
'7:47 PM', so that the time field dropdown will have 19:45, 19:46, 19:47, 19:48, etc. as options.
Color:
The value should be a string of color value in the HEX or RGBA format. For example: '#333333' or 'rgba(0, 0, 0, 0.9)' or rgba(255,255,255,0.75) (without space after the commas).
Relationship:
The can be any of the following:
• a string or integer of the post ID, or a string of comma-separated post IDs, or an array of integers or strings of post IDs. For example:
'1623' ,
1623,
'1623,760,10234',
array( 1621, 760, 10234 ) or
array( '1621', '760', '10234' ) • a string of the post name/slug, or a string of comma-separated post names/slugs or an array of comma-separated strings of post names/slugs. For example:
'the-latest-ai-innovation' or
'the-latest-ai-innovation, advances-in-climate-change-mitigation' (with spacing after comma), or
'the-latest-ai-innovation,advances-in-climate-change-mitigation' (without spacing after comma)
array( 'the-latest-ai-innovation', 'advances-in-climate-change-mitigation' ). This will be processed using
get_page_by_path(), so make sure the post name/slug includes the parent post's name/slug for hierarchical post type, e.g.
'parent-slug/post-slug'.
You can add
posts from different post types, as long as those post types have been assigned to the relationship field, i.e. available for selection Please also make sure the
posts already exist. Non-existent post IDs or names/slugs will not create new posts.
Term:
The value can be any of the following:
• A string or integer of the term ID, or a string of comma-separated term IDs, or an array of term IDs. For example: '12', or 12 or '75, 80, 96' (with spacing after commas) or '75,80,96' (without spacing after commas), or array( 75, 80, 96 ), or array( '75', '80', '96' )
• A string of the term name/title, or a string of comma-separated term names/titles, or an array of term names/titles. For example 'Technology', or 'Technology, Culture, Law' (with spacing after commas), or, 'Technology,Culture,Law' (without spacing after commas) array( 'Technology', 'Culture', 'Law' )
• A string of the term slug, or a string of comma-separated term slugs an array of term slugs. For example, 'technology', or 'technology, culture, law' (with spacing after commas), or 'technology,culture,law' (without spacing after commas), array( 'technology', 'culture', 'law' )
You can add terms from different taxonomies, as long as those taxonomies have been assigned to the term field, i.e. available for selection. Please also make sure the terms already exist. Non-existent term IDs, names and slugs will not create new terms.
User:
The value can be any of the following:
• A string or integer of the user ID, or a string of comma-separated user IDs, or an array of integer user IDs. For example:
'5',
5,
'5, 9, 15' (with spacing after commas) or
'5,9,15' (without spacing after commas), or
array( 5, 9, 15 )• A string of user email, or a string of comma-separated user emails, or an array of user emails. For example:
'[email protected]', or
'[email protected], [email protected]' (with spacing after comma), or
'[email protected],[email protected]' (without spacing after comma), or
array( '[email protected]', '[email protected]' )• A string of username, or a string of comma-separated usernames, or an array of usernames. For example:
'johndoe', or
'johndoe, bob_dylan' (with spacing after comma), or
'johndoe,bob_dylan' (without spacing after comma, or
array( 'johndoe', 'bob_dylan' )Please make sure that the
user accounts already exist. Non-existent user IDs, emails or usernames will not create new users.
Repeater:
The value should be an associative array of sub-field values. In the following example, there are two rows of sub-fields data, where movie_scene and movie_scene_caption are file and text sub-fields, and movie_scene_casts is a child/nested repeater sub-field with two rows of movie_scene_cast and movie_scene_actor text and relationship sub-fields.
Array(2)
(
0 => Array(3)
(
movie_scene => integer 10094
movie_scene_caption => string 'Hanging on a cliff' (18)
movie_scene_casts => Array(2)
(
0 => Array(2)
(
movie_scene_cast => string 'Ethan Hunt' (10)
movie_scene_actor => integer 5840
)
1 => Array(2)
(
movie_scene_cast => string 'August Walker' (13)
movie_scene_actor => integer 5998
)
)
)
1 => Array(2)
(
movie_scene => integer 10146
movie_scene_caption => string 'Face to face' (12)
)
)
This will produce the following values in the custom field group meta box: