WordPress.org

Ready to get started?Download WordPress

Forums

Removing 'Comments Off' From Special/Custom Posts (10 posts)

  1. damfino52
    Member
    Posted 2 years ago #

    I have installed a template which has 3 posts classed as special posts (custom post types). When I untick allow comments, it leaves a 'Comments Off' text over the comment bubble on the posts. Yet on the normal posts it puts a 0 instead.

    Anyone know how to change the 'Comments Off' text to a 0? I have looked in comments.php and fuctions.php and nothing there. Wondering where this CSS would be found?

  2. Tara
    Member
    Posted 2 years ago #

    On your posts screen, you should be able to filter by category and then select to turn off comments.

  3. damfino52
    Member
    Posted 2 years ago #

    As my post stated, I can turn off comments no problem. Its removing the actual text which appears in its place 'Comments off' which covers a pink comments bubble in the theme.

    I need to know where in the CSS you can amend the text to say something else

  4. Kurt
    Member
    Posted 2 years ago #

    damfino52:

    I suspect the "Comments off" text is coming from a template. Look at the code for the custom post type in the custom post type template. There should be code to call the comments.php file. There's probably an If - Else statement. If comments are on then call comments.php. Else if comments are off, echo (display) the "Comments off" text.

  5. damfino52
    Member
    Posted 2 years ago #

    Thanks Kurt. I have discovered it refers specifically to the FancyBox for WordPress plugin, so the CSS must be in there somewhere. No idea where

  6. Kurt
    Member
    Posted 2 years ago #

    damfino52:

    Are you talking about the php code for the custom post type template?

    If you would, put the name of the theme you're using, the file name for the custom post type template and paste the code where the comments.php file is called in the custom post template.

    Hopefully that will be enough to get us to an answer.

  7. damfino52
    Member
    Posted 2 years ago #

    There is no php file in the custom posts template. Just a fancybox.php file and that does not mention 'comments off' anywhere

    The template I am using is one I paid for so not available as a free one on WordPress

    When I do 'view source' this code refers to what I am trying to change (in bold). Cannot find this text anywhere in my css, or php files.

    /div>
    <div class="th">
    <div class="th_top"> <span class="comments-link">
    <span>Comments Off</span> </span> <span

  8. Kurt
    Member
    Posted 2 years ago #

    damfino52:

    Make a copy before you make changes.

    Then delete this:

    <span class="comments-link">
    <span>Comments Off</span> </span>

    Save the file.

    That should remove the text.

  9. damfino52
    Member
    Posted 2 years ago #

    Thanks Kurt. Appreciate your continued support. But I have no idea where to find the code you are referring to. Cannot seem to find any obvious file in my theme that has this span class mentioned.

  10. Kurt
    Member
    Posted 2 years ago #

    Hmm... Are you running any plugins that might affect the comments? You probably wouldn't want to modify the code of a plugin. But you could decide whether to use that plugin.

    It has to be somewhere in some file.

    I hope you can find it.

Topic Closed

This topic has been closed to new replies.

About this Topic