Home / Forums / DynamiX Support / Add text below comments

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • fscbmwcca
    fscbmwcca
    Participant

    Is there any way to add a static statement (like a disclaimer) above or below comments?

    Hi @fscbmwcca

    This can be done manually via the theme files or via plugins.

    This is briefly discussed here: https://wpsites.net/web-design/modify-text-before-after-comment-form/

    If you want to use a plugin, one example you can use is this: https://wordpress.org/plugins/add-widget-after-content/

    Regards

    fscbmwcca
    fscbmwcca
    Participant

    That worked thanks. One last favor (please) as I am not versed in php. Is there any way to add a line break to the text in quotes? For example:
    I want it to look like
    We value your privacy, your email address will not be published.</br>
    Required fields are marked *

    Here is my code::
    $arg[‘comment_notes_before’] = ‘<p class=”comment-notes”>’ . __( ‘We value your privacy, your email address will not be published. Required fields are marked *’ ) . ‘</p>’;
    return $arg;

    Thanks so much

    PS this is only displayed to users that are not logged in, how can I display to everyone?

    • This reply was modified 3 months, 3 weeks ago by fscbmwcca fscbmwcca.

    Hi @fscbmwcca

    Have you tried this code:

    $arg[‘comment_notes_before’] = ‘<p class=”comment-notes”>’ . __( ‘We value your privacy, your email address will not be published. .‘<br/>’. Required fields are marked *’ ) . ‘</p>’;
    return $arg;

    This will only displayed to non-logged in users since if logged in, the fields are already autofilled with their name and email address.

    Regards,

    fscbmwcca
    fscbmwcca
    Participant

    when i insert the .‘<br/>’. `between the sentences I get a 500 error.

    My complete code added to the child theme functions.php is

    `function wpsites_modify_text_before_comment_form($arg) {
    $arg[‘comment_notes_before’] = ‘<p class=”comment-notes”>’ . __( ‘Your email address will not be published. Required fields are marked *’ ) . ‘</p>’;
    return $arg;
    }

    add_filter(‘comment_form_defaults’, ‘wpsites_modify_text_before_comment_form’);

    We will also be creating a disclaimer about comments (I don’t have the wording yet), so I need this to be displayed to everyone logged in and logged out…

    Hi @fscbmwcca

    Can you please try this:

    function wpsites_modify_text_before_comment_form($arg) {
        $arg['comment_notes_before'] = '<p class="comment-notes">We value your privacy, your email address will not be published. <br/> Required fields are marked *</p>’;
        return $arg;
    }

    Regards,

    fscbmwcca
    fscbmwcca
    Participant

    500 error 🙁

    Hi @fscbmwcca

    Can you please send over your site’s FTP login credentials so I can test this?

    Regards,

    fscbmwcca
    fscbmwcca
    Participant
    This reply has been marked as private.

    Hi @fscbmwcca

    Please send your FTP credentials instead of the WP dashboard credentials as it’s safer to edit files from FTP.

    Regards,

    fscbmwcca
    fscbmwcca
    Participant
    This reply has been marked as private.

    Hi @fscbmwcca

    I could not connect to the FTP server. I think the login credentials you sent is for you Dashboard. Please send your FTP login so we can connect to the server.

    Regards,

    fscbmwcca
    fscbmwcca
    Participant
    This reply has been marked as private.

    Hi @fscbmwcca

    Can you also send over the FTP password? I think you forgot to send it.

    Regards,

    fscbmwcca
    fscbmwcca
    Participant
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic.