Change above code to like this:
<?php $cast_members = get_post_meta($post->post_parent, 'cast_members', true); ?>
<p><?php echo wpautop($cast_members); ?></p>
<?php endif; ?>
in this code wpautop() function automatically adds p tag for cast members.
Related Posts:
- How to update custom fields using the wp_insert_post() function?
- How to display multiple Post meta_key/meta_values by SQL query
- How to use multiple query with same meta key
- How can update custom meta for all posts
- Use ajax to update_post_meta
- how to increase custom post value by one most efficiently?
- How can I create a list of page titles from custom meta values?
- Store multiple custom field as post meta per post(css, js, html, 2 link) [closed]
- How to VAR_DUMP a $variable during checkout process (Is my product meta callable?)
- Is it possible to retrieve all posts with a certain value for metadata?
- Non-Closing PHP Query in WordPress Loop
- how to get serialized post meta
- WordPress loop by meta key that is an array? and how loop multiple arrays
- How to store multiple custom meta box
- Order a WP_Query by meta value where the value is an array
- Add a custom class to the body tag using custom fields
- Define category ID using get_post_meta
- Hide a div when a custom field is empty
- Order category posts by last word of custom field
- Add a “custom field” to a category that can be retrieved when viewing the category page with get_post_meta
- How to update custom fields when post is published?
- WP post meta – for loop inside for loop
- When working with a post, almost all wp_postmeta are deleted
- Updating Lat and Lng of posts automatically gives sporadic results
- If custom field doesn’t exist, or exists and it’s true show title?
- Metadata on the WP_Post object
- How can merge two arrays values in one array and save in database
- Check if user already visited this post today
- Update all posts automatically when using post_meta
- How to handle a custom form in wordpress to submit to another page?
- How to make an meta_query optional?
- How to loop over custom fields in a page template?
- Unique key for each row in a repeater field
- If Meta Checkbox is checked, do something?
- Batch update a post meta field value of each post in Post Type
- Create a random unique 6 digit number as custom field for custom post type
- The text box have space character
- how to remove metadata from the posts of my blog?
- Sort posts by custom fields value using dropdown menu
- WordPress – Display array data of a child
- Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
- Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?
- Need help with Google drive API [closed]
- Adding number to date not working [closed]
- Saving and Restoring a Canvas on A Individual User Basis
- How to use thumbnail size of image if I’m only using src to get image
- 3 Slashes appear after Apostrophe in custom fields after updating product-site
- Trouble checking if custom woocommerce checkout field is empty or not
- Archive post by meta value + 24hours
- Add / Update Custom Fields After Select Pictures in Media Window
- Trying to retrieve post meta
- Custom Field IF/ELSE PHP
- Advanced Custom Fields – display label and value only if value entered
- Run str_replace on title and save the output to a custom field
- Remove empty terms from array, sort alphabetically, update back to repeating field
- WordPress yoast seo plugin – parse snippet var in meta description
- if custom field doesn’t exist, use post thumbnail instead, as image background
- Update post meta – Custom field does not match meta-key
- Update value of a associative array with update_post_meta
- Front end file upload returning wrong attachment url
- Comparing Dates from custom field
- Adding custom url to readmore link using get_permalink()
- Display movies that apear this day next
- Add “alt” Attribute to GD Star Rating Tags
- custom header text
- Using a string from a custom field within a link
- Make separate text boxes for separate WordPress Custom Fields
- Dynamically added custom fields not displayed on WooCommerce email notifications
- Delete images from media library when user deletes an image from ACF Gallery
- How can I add diffrent editable text fields?
- Display custom field value in woocommerce variable product via jQurey
- Where does php code to load data go?
- ACF – Can’t get custom post type by taxonomy
- Hide author from search results meta, still display date and categories
- Sum All the Post Meta of Published posts of Current Logged in user
- update_post_meta Not Processing Array Data (Not Sure What I Am Missing)
- Adding user meta to post meta wp_insert_post() not working
- How to use something like meta_query but for fields?
- Efficient way of querying for a “fallback” post?
- php if, else & custom fields – syntax error
- How to get the first letter from custom field?
- Meta box not saving spaces
- Order by in foreach
- custom field meta-box with dropdown/autocomplete
- retrieve wordpress post-meta using php not wordpress functions
- get_post_meta is always empty when I use wp_mail
- Sorting Meta Fields?
- get_post_meta no longer working
- Display selected parts from selected pages on the frontpage?
- How to echo a different field if another field is empty?
- PHP Puzzle: Unique Styles with PHP loop
- How to display the date under the post title?
- Advanced Custom Fields Show PHP in Text Areas
- WP query with variables gives no result for specific user
- Grabbing value of input field inside of array
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- How can I change the location where the custom field is displayed in the Quick Edit tab in WordPress
- How do I organize posts based on their taxonomy?
- Custom Admin Menu Report for Specific User ID
- Shortcode Displays 2 times