Skip Navigation

[Resolved] Cannot remove Content Template metabox.

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 6 years ago.

Assisted by: Luo Yang.

Author
Posts
#1170780

I already tried the same solutions as mentioned in other solved threads.
It's just not working in my scenario.

function hsb_remove_metaboxes() {
	remove_meta_box( 'views_template' , 'medarbejder' , 'side' ); 
	remove_meta_box( 'slugdiv' , 'medarbejder' , 'side' ); 
}
add_action( 'admin_menu' , 'hsb_remove_metaboxes',20 );

slugdiv is removed. content template isn't. they are on the same post type. Why?

#1171097

Hi,

In the latest version of Views plugin, there is a filter hook "wpv_filter_wpv_disable_post_content_template_metabox", you can use it to disable the content template metabox, for example:

add_filter('wpv_filter_wpv_disable_post_content_template_metabox', function($res, $post){
	if(get_post_type($post) == 'medarbejder'){
		$res = true;
	}
	return $res;
}, 10, 2);