Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #229038

    Hello,
    Is it possible to remove the comments only on blog posts belonging to one category ?
    If so what code should I add or change ?
    Is it also possible to change the text of the comment section such as “Replies” into “Comments” ?
    Thank you very much

    #229200

    Hi,

    Open single.php and look for line 43:

    comments_template( '/includes/comments.php');
    

    Replace it by this:

    if(!in_category(16)){ comments_template( '/includes/comments.php'); }
    

    Where 16 is the ID of the category in question.

    Regards,
    Josue

    #229201

    Regarding the other issue, open includes/comments.php and look for line 46:

    $rep	= __( 'replies', 'avia_framework' );
    

    Replace it by this:

    $rep	= __( 'comments', 'avia_framework' );
    

    Regards,
    Josue

    #232906

    Thank you very much!

    • This reply was modified 10 years, 9 months ago by Amanda.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Remove comments from one category’ is closed to new replies.