• 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 Genesis Meta Box For Custom URLS

This download folder contains code which adds a text field on your single post/page/cpt edit screen for internal or external links.

Genesis includes several functions to make it easier to add custom meta boxes in Genesis child themes.

genesis_sanitize_html – Custom function located in genesis > lib > functions > formatting.php which uses a WordPress function to ensure the user inputed data is in proper form and remove any invalid characters.

genesis_save_custom_fields – Custom function located in genesis > lib > functions > options.php which uses WordPress functions to save the custom field key & value to the database if a value is added or changed.

Demo Video

Shows an external URL added to a custom meta box named Custom URL used to link a button on a single post.

Tested using the Genesis Sample child theme by StudioPress however will work in any Genesis child theme.

Installation Steps

There’s 2 steps :

  1. # Upload the file named url-form.php to your child theme folder like this :
  2.  

  3. # Copy & paste the code from functions.php to the end of your child themes functions file.
  4.  

Download Folder

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.