How To Add A Custom Meta Box For Text Area

This code creates a new custom meta box which looks like the scripts box Genesis includes on all edit posts and page screens.

custom meta box

Here’s the code which you can use in your functions file or a new file which you can then include in your functions file.

Installation and code modification support are provided to all members of WP Sites.

If you’re not using Genesis, you’ll find this code still works, however you will need to use the native WordPress template tags for custom fields rather than the genesis_get_custom_field:

<?php echo get_post_meta($post->ID, 'wpsites_textarea', true); ?>

Or

<?php the_meta(); ?>

Either can be used in a template file or custom function with hook and conditional tag.

Here’s the code for the meta box:

Related Tutorials

One response to “How To Add A Custom Meta Box For Text Area”

  1. […] Custom Meta Box Code For Text Area […]

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.