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

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Add Meta Box To Custom Post Type Archive

This file, enables you to add any type of meta box to any custom post type edit screen. In this case, we’ve added a text box which enables you to add a URL for a image which can then be printed on the front end of the CPT archive.

Simple 2 Step Installation

After downloading the zip folder for logged in members below :

Step 1 : Upload the cpt-box.php file to your child themes root directory.

Step 2 : Add the following line of PHP code to the end of your child themes functions.php file:

include_once( get_theme_file_path( '/cpt-box.php' ) );

And here’s what the code generates on CPT archive edit screens :

Demo Video

The video shows how you the code has added a new meta box and menu item to the screen options drop down menu. You can add a link to the text field in the meta box and the image displays on the frontend of the CPT archive page below the header. If no image is added, you can add a fallback.png image to your child themes images folder which will be show by default.

The meta box can be displayed on all or any CPT edit screen.

Here’s the zip file for logged in members:

Register for full access

Custom Post Type 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.