Access status of comments in header.php (1 post)

  1. aldolat
    Posted 6 years ago #

    On my functions.php I have to disable a feature of a plugin for comments.
    I tried:

    if (!have_comments()) {

    but have_comments() doesn't have any effect: the script is globally deregistered.

    What can I do to access the comments status via functions.php? Or how can I deregister a script only if a page or post hasn't comments?

Topic Closed

This topic has been closed to new replies.

About this Topic