How to add MD Metaboxes to Custom Post Types + Taxonomies

2 new filters were introduced in Marketers Delight 4.3.5 that allow you to add the default Layout, Page Leads, Featured Image, and other options from MD addons to any Custom Post Type or Taxonomy added to your WordPress installation.

(sample filters also included in the MD Child Theme from your account)

/**
 * Add MD meta options to any Custom Post Type.
 */

function md_add_post_type_meta() {
	return array( 'download', 'product' );
}

add_filter( 'md_post_type_meta', 'md_add_post_type_meta' );


/**
 * Add MD meta options to any Custom Taxonomy.
 */

function md_add_taxonomy_meta() {
	return array( 'download_category', 'product_cat' );
}

add_filter( 'md_taxonomy_meta', 'md_add_taxonomy_meta' );

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:

https://domain.com/wp-admin/edit.php?post_type=download
MD Custom Post Types

…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