I wasn’t surprised when one of my buyer asked me if there’s a way to hide features like tags, comments widgets. Its not uncommon in a simple CMS based projects where tags and comments widgets are seldom needed. Hence, I came up with a simple trick to hide those widgets.
Basically I used help of CSS ‘display:none’ to achieve it. I created a function ‘hide_wp_tags_from_admin’ and then I added this filter to to admin head using add_action. You must either create a plugin and add it to plugins folder or you can use a quick dirty hack by adding below function to function.php of your active theme.
function hide_wp_tags_from_admin() { echo '<!-- #commentsdiv, #tagsdiv-post_tag { display:none; } -->'; } add_action('admin_head', 'hide_wp_tags_from_admin');
Very simple; isn’t it? Have your say.
