Use PHP explode
function and convert string into array using a delimiter |
then you can use foreach
loop.
Example:-
$str = get_the_author_meta('my_pet', $author_id);
$pets_array = explode('| ', $str);
if (is_array($pets_array)) {
foreach ($pets_array as $pet) {
echo $pet;
echo 'somtext';
echo '<br />';
}
}
Related Posts:
- How to order users by a date in the meta_value array
- Building a scalable WordPress favouriting plugin – one serialised meta value array or many meta records
- Multiple User-Meta Values in One User-Meta Key
- How to insert new element to existing array in usermeta?
- Get user_meta values for a user for an array of meta_keys?
- How to get its meta_value of a specific meta_key within wp_usermeta
- Exclude specific user_id from args in get_comments
- How to display user_meta array as a table?
- how to get users with usermeta include array of an array
- get_user_meta value is stored within strange characters
- Get user count based on multiple meta key values?
- Get basic Image Uploader on User Profile Page
- Return all users with a specific meta key
- Capabilities Vs User Meta
- get_users is expecting unserialized meta_value
- How to get user metadata for social media url?
- Check if WP_User_Query ‘include’ is empty
- User meta to post
- Front end user meta options for users
- Add profile field (usermeta) to Add New User
- How to Make admin Sidebar Menu always be Collapse by code
- How do I update a specific object in an array, in user meta?
- Can I create front-end editable user profile pages with WordPress? How do I do it?
- How to query users by meta value, even when meta key doesn’t exist?
- Allow role to edit users at lower level with only specific metadata
- Hook or action to save profile fields at specific time
- Possible bug: update_user_meta is updating two unique meta entries
- How to display current_user bio
- Is a user_meta research case-sensitive or not
- How to tell whether a user meta value has increased or decreased [closed]
- How to edit custom user meta information front end
- Send mail to user only once when specific check box is selected and updated from profile meta updated by admin
- WP_user_query throws a 404 error
- How to save data of an input field to an array
- Run a check for multiple meta key values
- Incrementally add or substract from usermeta field
- Meta_query on same meta key, with diffrenct values
- strange issue with user_meta + json_encode/decode
- Inserting and finding multiple values in user-meta fields
- Update user meta on logout
- Adding user data to an existing user_id
- I want to update my user meta table
- Subscribers Group User meta delete
- action user_new_form param is a string
- Redirecting users based on custom user meta
- Customize Avatar using user meta
- Sort alphabetically by custom field
- Frontend Image Upload
- Custom order for Mysql array
- Randomize Users
- Fetch user related data
- “Select your country” landing page. Remember user choice
- Order By Meta_key but convert custom date to Y-m-d first
- Using xprofile_insert_field
- last_name + first_name orderby with meta_query [solved]
- Combining wp_list_authors with get_user_meta
- How to update and save user metadata on page visits?
- Using WP for user management
- Show extra user profile meta for current user
- Pulling member name from WordPress URL
- If Array Values Match Another Array’s Values, Then
- Print specific values stored in a post meta array
- Comapare get_user_meta value
- How can get all users by current user meta?
- query_posts with meta_value
- Remove fields from WordPress profile
- E-mail Update – Validation
- How to save a label for an extra user meta field and to display it later?
- Display user meta data from a textarea as a formated text
- gform_after_submission not working as expected [closed]
- Remove user id’s stored in arrays that themselves are stored in user meta of another user
- Sort users by meta key value even if meta key not present for all users
- User query – getting values for custom meta keys/fields
- How do I echo all users’ display_name and their meta_value who have a certain meta_key?
- Wrong result in fetching User meta of WordPress
- Fetch user’s using Last Name
- How can I search user meta by a partial key name?
- Delete user meta ( delete_user_meta ) by key without user id
- Why is my Custom User Meta deleted on Profile Update?
- wp_redirect not working after update_user_meta
- profile_update works on second update only
- How to remove the url format from the WEBSITE field in the user registry?
- users joined group count in buddypress
- Edit a user profile field on front end
- SQL – Shorter way to query user and usermeta data
- WP author meta disappeared
- How to set a user meta key value based on another user meta key value
- Changing an array of IDs in the usermeta table to fit different format
- Saving an array of values (file urls) to update_user_meta()?
- Need help getting a certain value out of a multi dimensional array
- get user role value as a string from wp usermeta table into custom script
- how to query for meta_value have array
- Get currentuserinfo firstname and lastname
- Create a dropdown list displaying users meta data
- Multidimensional array problem with update_post_meta [duplicate]
- Updating wordpress user meta data array (unexpected multiple arrays)
- Using IDX feed to display agent’s and listings with agent’s info associated for Real Estate Website
- CRM and newsletter integration? [closed]
- Custom user meta data [closed]
- How can I list users by date in an array in meta_value?