I have this saved:

$description = get_post_meta( $postID, 'video_desc', true );

and then have used this in my form in textarea:

value="<?php echo $description; ?>"

When I check the console it is there as the value but it is not displaying in the textarea. I am wanting this to show the text as it is in a edit-post.php page/file.

I have been searching for hours!! Any help would be much appreciated.

closed as off-topic by TheDeadMedic, Mayeenul Islam, Robert hue, s_ha_dum May 12 '15 at 20:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.


The value of the textarea must be printed between the opening and the closing tag:

<form action="/">
    <textarea name="whatever"><?php echo esc_textarea( $description ); ?></textarea>

Note the usage of the function esc_textarea() here. It prevents any possible character inside the variable $description from being interpreted as HTML. It's an important step to avoid possibly XSS vulnerabilities.

There are many more escaping functions like esc_attr(), esc_html() or esc_url(). You should know about them and how they are meant to be used: https://codex.wordpress.org/Data_Validation

Not the answer you're looking for? Browse other questions tagged or ask your own question.