• 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

Add Meta Box in Genesis

This tutorial provides the code for adding meta boxes in Genesis and uses 2 functions native to Genesis:

  • genesis_get_custom_field
  • genesis_save_custom_fields
Note: The code won’t work in non Genesis child themes however it provides an easier way to code meta boxes into your child theme as opposed to using all the code needed by a non Genesis child theme.

I’ve already published 2 posts containing 2 different code snippets for creating meta boxes in WordPress if you’re not using Genesis. Either way, all code works in Genesis and doesn’t make much difference which code you use.

The only difference with the code in this tutorial is you don’t need to create a custom field. You simply paste the value for the field you want to use in the custom meta box this code generates.

In this example, the code generates a box which is 3 rows high for a URL which you can grab after uploading your media file to the WordPress Media Library and output anywhere as a image, audio file or video file.

I tested this code with the Podcast child theme i created which uses the native WordPress custom fields meta box.

Here’s the box it produces:

meta-box

You can modify the code to:

  • Change the position the box is displayed on Edit Post screens.
  • Change the height of the box by changing the amount of rows and columns
  • Use any of the parameters available when using the add_meta_box function
  • Control which users can use and see the box

Here’s the code you simply paste in your child themes functions file:

Register for full access

Related Code Snippets

  • How To Add A Genesis Meta Box For Custom URLS
  • Add Genesis Meta Box With Checkbox
  • Custom Meta Box Code For Text Area
  • PHP Code For Adding Custom Meta Box With WP Editor

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.