How do i integrate a comment system in a page and not on a post?

I am enquiring about the plugin comment +, I would like to integrate a comment system for users to comment. However, i would like the comment system on a page and NOT on a post, is there a way ?

  • Nithin

    Hi Aaron,

    Hope you are doing good today. :slight_smile:

    From WordPress version 4.3, all the page comments are disabled by default, you can enable comment for your pages, by selecting your pages, and clicking Bulk edit, once done, you can allow the comments, as shown in the screenshot:

    You could also do the same for posts, if you are looking to disable the comments for post globally, please add the following code in your themes functions.php :

    add_filter( 'comments_open', 'disable_post_comments', 10, 2 );
    
    function disable_post_comments( $open, $post_id ) {
    
    	$post = get_post( $post_id );
    
    	if ( 'post' == $post->post_type )
    		$open = false;
    
    	return $open;
    }

    Would recommend you make the changes to your theme using a Child theme, so that the changes made doesn't get overwritten when your update your theme.

    Please let us know if you still need any further assistance. Have a nice weekend. :slight_smile:

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.