• Resolved deirdrehughes

    (@deirdrehughes)


    I have comments turned off for all posts, and would like to remove the “no comments” (comment counting) element from posts altogether so that this text does not appear. Based on previous WP support blog postings, I’ve looked in archive.php, single.php and index.php but can’t determine what to modify. I see there is a comments.php, but I don’t know if this is where I need to be looking.

    Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • It’s better to do it with CSS, or by using a child theme, instead of making the changes directly on your theme’s php files.

    It’d also be easier for people to help if you posted a link to your site.

    Thread Starter deirdrehughes

    (@deirdrehughes)

    Thanks keyalea. Intended to include site link but forgot — apologies. It’s https://trishstenson.com/

    Remove below code from content.php (line 20)

    <?php comments_number(__(‘No Comments’,’tribute’), __(‘One Comment’, ‘tribute’), __(‘% Comments’, ‘tribute’) );?>

    Thread Starter deirdrehughes

    (@deirdrehughes)

    Many, many thanks!

    Theme Author Ydesignservices

    (@ydesignservices)

    Thanks descology for the help.

    As a general rule, you shouldn’t be making changes directly to theme files. If the theme gets updated because of feature enhancements, bug fixes, or security patches, or if the theme has to be updated because of a change to the WordPress core, then your changes will be lost. Instead, create a child theme and make your changes to a copy of the file you want to modify (i.e., content.php).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘removing "No Comments" in posts’ is closed to new replies.