adding text/links to comments closed line

When you close comments on a post or just have them off to visitors I would like to have it not just say comments closed but something like - Sorry you can not leave comments as a visitor. Please consider subscribing to get access to full stories and lots of great features on our site.

Is there a plug in that does this or do I have to edit a file to make it happen?

I am using WP/BP and a child theme.

I appreciate your help. Thanks.

  • Kimberly
    • Champion of Loops

    Joe,

    You can set the comments to "user must be logged in to comment" under the Dashboard>Settings>Discussion and it will automatically generate a message saying "You must be Logged In to comment" with logged in being clickable text.

    You can check your comments.php for your theme to find the text you are looking for :slight_smile:

    i am not sure what you are using, so I cannot verify

    Best,

    Kimberly

    If this thread is not resolved because the suggested action did not work or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

  • Kimberly
    • Champion of Loops

    Hey Joe,

    This is what I see using BP Corporate with BP and Membersip installed when logged out.

    I did find that this is controlled in the comments.php by this:

    comment_form()

    Here is an older fix that I found to add a filter to comments.php

    <?php comment_form(array('must_log_in'=>"You must be <a href='http://localhost/wp/members-area/'>logged in</a> to post a comment.")); ?>

    Change out the text and link accordingly

  • JOE KARL
    • WPMU DEV Initiate

    I am using The Daily Theme not Corporate.

    I see the comment_form you mentioned and right above that is the info that shows what's there. I wouldn't have a clue how to modify that to say what it should.

    It isn't the standard thing though.

    Very frustrating.

  • marikamitsos
    • The Crimson Coder

    Hello Joe

    In order to enhance Kimberly's excellent solution I did this:
    I created for you customized .po and ,mo files to meet your needs.
    Meaning, you will find the "Comments are closed" string is "translated" to "Sorry you can not leave comments as a visitor. Please consider subscribing to get access to full stories and lots of great features on our site."
    All you have to do now is:
    1. Right click these daily-en_EN.po and daily-en_EN.mo files and choose "Save" in your computer.
    2. Rename the two files to: en_EN.po and en_EN.mo
    3. Upload the renamed files to your Daily theme/languages folder
    4. (Important) Keep a back-up copy in a safe place so you can re-upload the two files after/when you upgrade the Daily theme.
    5. Frustration gone. Enjoy. :slight_smile:

    I believe this is a safer solution than messing with the comments.php file.

    I hope this helps,
    marikamitsos

    PS: Should you find the above satisfactory please feel free to mark the post "Resolved".

  • marikamitsos
    • The Crimson Coder

    Hello Joe for leaving stranded here,

    We didn't hear of you and that got me wondering. So I went over to your site and just realized you have a single site installation.
    Given that you may find that the little "trick" I gave you probably doesn't work. There is one extra step you have to take so as to register your "new" language:

    As per WordPress instructions you will need to add the following to your config.php file.

    define('WPLANG', 'en_EN');

    Now you are all set. :slight_smile:
    Please let know how you did. Happy Easter,
    marikamitsos

    PS: I have to be away for a couple of days (Easter time is a week later than yours) but will check on if you got it sorted out

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.