Search Divi Plus Documentation

Search for answers or browse our knowledge base.

< All Topics
Print

How can enable comment support in the Divi Plus team member custom post type?

We do not have support for comments for this custom post type. However, you can add the code in the child theme’s functions.php file.

function dipl_ct_add_comments_support($args, $post_type){
 
    if ( 'dipl-team-member' === $post_type ){
        if ( ! empty( $args['supports] ) && is_array( $args['supports'] ) ){
            array_push( $args['supports'], 'comments' );
        }
    }
 
    return $args;
}
add_filter('register_post_type_args', 'dipl_ct_add_comments_support', 10, 2);
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.