Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #520629

    We’ve been trying to disable commenting on our blog posts and can’t get them turned off. We’ve searched the Enfold forum and found some things to try, but none have worked.

    Here is a link to our blog page:
    http://www.helpersinc.org/news/

    We’ve turned off comments in WordPress Settings -> Discussion, but that didn’t have any effect.

    Please tell us how to turn off all comments on our blog posts using the Enfold theme.

    Thank you!

    #520633

    I added the following CSS that seems to work, but can you verify this is the right way to hide commenting?

    .side-container-comment, .comment_container
    { display:none; }

    #520991

    Hey!

    That works fine. You could also go to Settings > Discussion and uncheck “Allow people to post comments on new articles “. Or edit your blog posts, click “Screen options” on the right top corner and check “discussion” and then scroll below and disable them.

    Best regards,
    Yigit

    #781838

    @yigit: how can you disable commenting on old posts? It works for new posts… but not for old ones… visitors can still comments… and I cannot disable manually over 2.000 blogposts…

    #781884

    Hi Jooster,

    There is no functionality like that in the theme unfortunately, could you try searching for a plugin maybe?

    Best regards,
    Rikard

    #852007

    Greetings from Vienna!
    I have a problem that I cannot see any way to switch on comments in the blogs.

    I have activated discussions in WP but I do not see any button for coments appearing on the blog nor any avatar.

    Thank you in advance for your support
    best regards

    Gerhard

    #852023

    or a radikal method via functions.php of your child-theme:
    (the comments on that code shows you what is done by the code)

    please try this here :

    // Disable support for comments and trackbacks in post types
    function df_disable_comments_post_types_support() {
    	$post_types = get_post_types();
    	foreach ($post_types as $post_type) {
    		if(post_type_supports($post_type, 'comments')) {
    			remove_post_type_support($post_type, 'comments');
    			remove_post_type_support($post_type, 'trackbacks');
    		}
    	}
    }
    add_action('admin_init', 'df_disable_comments_post_types_support');
    
    // Close comments on the front-end
    function df_disable_comments_status() {
    	return false;
    }
    add_filter('comments_open', 'df_disable_comments_status', 20, 2);
    add_filter('pings_open', 'df_disable_comments_status', 20, 2);
    
    // Hide existing comments
    function df_disable_comments_hide_existing_comments($comments) {
    	$comments = array();
    	return $comments;
    }
    add_filter('comments_array', 'df_disable_comments_hide_existing_comments', 10, 2);

    to quick css

    .comment-entry {
        display: none;
    }
    #852024

    @samurai 666 : this is offtopic isn’t it ?

    please make a new thread.

    #852027

    and if you are a bit paranoid : add this to functions.php / child-theme

    // Redirect any user trying to access comments page
    function df_disable_comments_admin_menu_redirect() {
    	global $pagenow;
    	if ($pagenow === 'edit-comments.php') {
    		wp_redirect(admin_url()); exit;
    	}
    }
    add_action('admin_init', 'df_disable_comments_admin_menu_redirect');

    or use: https://de.wordpress.org/plugins/disable-comments/

    #852029

    if you even don’t like to have on dashboard or admin top menu the comments functionality:

    // Remove comments metabox from dashboard
    function df_disable_comments_dashboard() {
    	remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
    }
    add_action('admin_init', 'df_disable_comments_dashboard');
    
    // Remove comments links from admin bar
    function df_disable_comments_admin_bar() {
    	if (is_admin_bar_showing()) {
    		remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
    	}
    }
    add_action('init', 'df_disable_comments_admin_bar');

    but best advice is to use the very good plugin “disable comments” !
    but to make it perfect – you have to get rid of .comment-container minor-meta. in post-meta-info !

    • This reply was modified 7 years, 3 months ago by Guenni007.
    #852090

    Hello and Thank you for your comments!

    Thing is: I want to switch on the comments button. It is not there!

    best regards from Vienna

    Gerhard

    #852941

    Hi,

    @samurai_666

    Please start a new post with the admin login in the private content area so we can take a closer look.

    Best regards,
    Mike

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.