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

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

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

  • Hand Coded Meta Box for Genesis
  • 10 Ways To Display Custom Fields Using Custom Functions

Meta Box

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems