Skip Navigation

[Résolu] Cannot remove Content Template metabox.

This support ticket is created Il y a 5 années et 4 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Marqué : 

This topic contains 1 réponse, has 2 voix.

Last updated by Luo Yang Il y a 5 années et 4 mois.

Assisted by: Luo Yang.

Auteur
Publications
#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);
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.