Community Forums › Forums › Archived Forums › General Discussion › Is it possible to unregister the 'Comments and Trackbacks' section in the admin
- This topic has 7 replies, 3 voices, and was last updated 9 years, 3 months ago by ams2.
-
AuthorPosts
-
December 26, 2014 at 11:47 am #135346ams2Member
Is it possible to unregister the 'Comments and Trackbacks' section in the admin. So it is removed from the admin customize page and the Genesis theme settings page and so it isn't running in the background. Can't find out how to do that anywhere.
I saw a website where you can do it by remove_meta_box, but it is still woorking in the background and still appears in the admin customize page
December 26, 2014 at 1:20 pm #135348Ren VenturaMemberI have not tried it but this seems to completely remove all comment functionality from WordPress.
http://wpengineer.com/2230/removing-comments-absolutely-wordpress/
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
December 26, 2014 at 9:26 pm #135377ams2MemberThanks for your comment Ren, it wasn't quite what I am looking but it was my fault, I meant to say only remove the Genesis 'Comments and Trackbacks'
I have a wordpress multisite that is used for blogging only, and building a community with it. If Genesis isn't installed and I was using another theme, when a user signs up to create a blog, the default settings mean users can leave comments and trackbacks on posts and pages, this is how I prefer these default settings. Then users can go to settings - discussions to either close comments on new articles/ automatically close comments within a certain time, turn off trackbacks, or turn on/off comments & trackbacks per page and per post.
This is how I would prefer it to be and it is all that I need. And I have in my instructions for users how do this.
With Genesis installed it adds its own 'Comments and Trackbacks' to turn on or off, which for my type of multisite is not needed, so I would like to completely remove that Genesis feature the same way you can unregister a layout or the secondary navigation.
It isn't much problem having that Genesis feature, but I would prefer users not to use it.
Any help appreciated.
December 27, 2014 at 1:39 am #135386Genesis DeveloperMemberAdd this in your functions.php file
if (is_admin()) : function remove_genesis_comments_trackbacks_settings($pagehook) { remove_meta_box( 'genesis-theme-settings-comments', $pagehook, 'main' ); } add_action( 'genesis_theme_settings_metaboxes' , 'remove_genesis_comments_trackbacks_settings'); endif;
December 30, 2014 at 6:21 am #135656ams2MemberThank.
Is it possible to remove it from admin > appearance > customize. Because it still shows in the admin customize page.
December 30, 2014 at 7:42 am #135661Genesis DeveloperMemberwhich theme are you using ? code is locating in the child theme folder. You'll check it properly and disable them
December 30, 2014 at 8:08 am #135664Genesis DeveloperMemberSorry i was wrong. it is doable from functions.php file
December 30, 2014 at 1:26 pm #135685ams2MemberNice one Mr Chinmoy Paul, you managed to work it out. Got it from your website:
// Removing it from Customizer page
add_action( 'customize_register', 'gd_remove_customize_section', 20 );
function gd_remove_customize_section($wp_customize){
$wp_customize->remove_section( 'genesis_comments');
}Was struggling with that one for a while, thanks.
-
AuthorPosts
- The topic ‘Is it possible to unregister the 'Comments and Trackbacks' section in the admin’ is closed to new replies.