Skip to main content

As of version 12, the Salient metaboxs found on pages can now be added to a custom post type through a filter in your child theme.

  • Step 1: Open your child theme functions.php (salient-child/functions.php)
  • Step 2: Copy the below snippet into the bottom and replace “your_custom_post_type” with the name of your actual post type.
// Add Salient meta boxes to custom post types.
function salient_child_page_header_post_types($post_types) {
	
	$new_post_types = array(
		'your_custom_post_type'
	);
 
	$post_types = array_merge($new_post_types, $post_types);
 
	return $post_types;
}

add_filter('nectar_metabox_post_types_page_header', 'salient_child_page_header_post_types');

  • Step 3 (optional): The above filter will add the page header metabox to your custom post type. If you wish to get any of the other metaboxes in your custom post type, other filters are available for those as well: nectar_metabox_post_types_navigation_transparency and nectar_metabox_post_types_fullscreen_rows