• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

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:

Register for full access

Related Tutorials

  • How To Add A Genesis Meta Box For Custom URLS
  • Hand Coded Meta Box for Genesis
  • 10 Ways To Display Custom Fields Using Custom Functions

Custom Fields Meta Box

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.