Enable MD features to custom post types and taxonomies

Click to copy

Paste to your child theme's functions.php file:

 * Add MD meta options to any Custom Post Type.

function md_add_post_type_meta( $post_type ) {
	$post_type[] = 'download';
	return $post_type;
add_filter( 'md_post_type_meta', 'md_add_post_type_meta' );

 * Add MD meta options to any Custom Taxonomy.

function md_add_taxonomy_meta( $taxonomy ) {
	$taxonomy[] = 'download_category';
	$taxonomy[] = 'product_cat';
	return $taxonomy;
add_filter( 'md_taxonomy_meta', 'md_add_taxonomy_meta' );

Add MD Meta Boxes to Custom Post Types

These filters are included in the MD Child Theme by default and can be used to add any active MD meta boxes to the post editor screen of custom post types and taxonomies.

This includes Featured Image controls, Layout Options, Popups, and other meta boxes added to MD out of the box (and not disabled with the Features Manager).

To use the filters, all that’s needed is the ID of the post type or taxonomy and plugging them into their respective filters.

To find the ID of a Custom Post Type (CPT), click through to the main screen and look in your browser’s address bar to find a URL with the post_type attribute set, like so:

MD Custom Post Types

Click for a larger size

…the process for finding any custom Taxonomy is the same, simply click through to any Custom Post Types “category” pages and grab the taxonomy ID from the URL:

MD Custom Taxonomy

Click for larger view

Start Building Websites That Delight

You can use the Marketers Delight WordPress Theme on unlimited sites. New features & updates are delivered to sites with your active license key.

Add to Cart

NEW: Try out the brand new MD Drop-ins Manager!

Start building your website with MD now

Get started with MD today. Pay once for use on unlimited websites.
* Save 40% on license key renewals every 12 months. Get auto-updates sent to 5 websites.


Get the latest MD sent straight to your inbox

There's always something new in the MD Labs! Join the email list to get the newest content and releases sent straight to your inbox.*

Join the MD Newsletter

* I only email you when there's something new, or to share an exciting MD sneak peak.