Last Updated:

Remove Glossary Plugin Meta Box in WordPress Editor

Glossary, is a plugin that allows you to create a glossary of terms. It is quite comprehensive and also allows you to create external and internal links to the site without necessarily having to create an article. This plugin creates a metabox in the article editing section (wordpress post back office). Someone may need to remove this metabox for certain reasons.

Simply insert the following code at the end of the function.php.

if (!current_user_can(‘edit_pages’)){
add_action(‘add_meta_boxes’,‘my_remove_glossary_post_metabox’,100000);
}
function my_remove_glossary_post_metabox(){
remove_meta_box(‘glossary_post_metabox’,‘post’,‘normal’);
}
add_action(‘admin_menu’,‘wpdocs_remove_post_custom_fields’);
if(is_admin()){
add_action(‘admin_menu’,‘wpdocs_remove_meta_boxes’);
}

I suggest you create a child theme where you can insert this code.

Avoid using the standard removal system below or you will have problems.

function remove_my_post_metabosex(){
remove_meta_box(‘authordiv’,‘post’,‘normal’);
remove_meta_box(‘commentstatusdiv’,‘post’,‘normal’);
remove_meta_box(‘commentsdiv’,‘post’,‘normal’);
remove_meta_box(‘postcustom’,‘post’,‘normal’);
remove_meta_box(‘postexcerpt’,‘post’,‘normal’);
remove_meta_box(‘revisionsdiv’,‘post’,‘normal’);
remove_meta_box(‘slugdiv’,‘post’,‘normal’);
remove_meta_box(‘trackbacksdiv’,‘post’,‘normal’);
remove_meta_box(‘related_post_metabox’,‘post’,‘high’);
}
add_action(‘admin_menu’,‘remove_my_post_metaboxes’);

I tried this change with plugin version 1.4.11. Before making the change make sure you make a backup, make sure you know what you are doing right, and make sure the function names do not conflict with other names already in the code.

Use this article if you know what you are doing I take no responsibility. You can share the content of this article by creating a direct link without a ‘nofollow’ attribute to this page.