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


Comments

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

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

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.