Viewing 30 posts - 1 through 30 (of 33 total)
  • Author
    Posts
  • #992040

    I´d like to make some changes to the “comments” element namely by changing the text below with personalised text:

    “Leave a Reply
    Want to join the discussion?
    Feel free to contribute!”

    as well as changing the position of the “name, email, website” words to the left of the input boxes as opposed to the right.

    Any suggestions would be very much appreciated.

    Many thanks

    #992379

    Hey ProTravelGolf,

    Thank you for using Enfold.

    Those text are inside the theme’s “comments.php” file. You can modify that file directly or use the “Say What?” plugin.

    // https://wordpress.org/plugins/say-what/

    Best regards,
    Ismael

    #992405
    This reply has been marked as private.
    #992494

    Hi,
    How would I do this via comments.php?

    #992704

    Hi,

    Thanks for the update.

    You should see these codes in the comments.php file, around line 164.

     echo "
    <div class='comment_container'>";
    echo "<h3 class='miniheading'>".__('Leave a Reply','avia_framework')."</h3>";
    		 echo "<span class='minitext'>".__('Want to join the discussion?','avia_framework')."".__('Feel free to contribute!','avia_framework')."</span>";
    		 comment_form();
    		 echo "</div>";
    

    Just change the default text to something else and then saved the file. If it’s not working, post the login details in the private field so that we can test it. Make sure that the Appearance > Editor panel is accessible.

    Best regards,
    Ismael

    #992921
    This reply has been marked as private.
    #993175

    Hi,

    1.) Yes, that’s correct. You can create a copy of that file and move it to the child theme folder to keep the changes in case of a theme update. :)

    // https://developer.wordpress.org/themes/basics/template-files/

    2.) You can use this filter to change the label and the markup of the comment form fields.

    add_filter( 'comment_form_fields', 'avf_default_comment_fields', 10, 1);
    function avf_default_comment_fields($fields)
    {	
        $fields   =  array(
            'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
                        '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" maxlength="245"' . $aria_req . $html_req . ' /></p>',
            'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
                        '<input id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30" maxlength="100" aria-describedby="email-notes"' . $aria_req . $html_req  . ' /></p>',
            'url'    => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label> ' .
                        '<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" /></p>',
        );
    
    	return $fields;
    }

    Best regards,
    Ismael

    #993200
    This reply has been marked as private.
    #993227

    Hi,

    You should put it in the functions.php file. Edit that file via Appearance > Editor panel or your file server. Adjust these parts:

    __( 'Name' )
    __( 'Email' )
     __( 'Website' )

    Best regards,
    Ismael

    #993243
    This reply has been marked as private.
    #993296

    Thanks Ishmael, this worked perfectly!

    #993306
    This reply has been marked as private.
    #993798

    Hi,

    Thanks for the update.

    I forgot to add the comment form’s field. Please try it again.

    add_filter( 'comment_form_fields', 'avf_default_comment_fields', 10, 1);
    function avf_default_comment_fields($fields)
    {	
        $fields   =  array(
            'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
                        '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" maxlength="245"' . $aria_req . $html_req . ' /></p>',
            'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
                        '<input id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30" maxlength="100" aria-describedby="email-notes"' . $aria_req . $html_req  . ' /></p>',
            'url'    => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label> ' .
                        '<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" /></p>',
            'comment' => '<p class="comment-form-comment"><label for="comment">' . __( 'Comment' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" required="required"></textarea></p>'
        );
    
    	return $fields;
    }
    

    Best regards,
    Ismael

    #994032
    This reply has been marked as private.
    #994188

    Hi,

    1.) Use this css code to move the labels to the right of the input fields.

    #commentform label {
        position: relative;
        margin-bottom: 5px;
    }
    

    2.) Add this filter to change the default button text.

    add_filter( 'comment_form_defaults', 'avf_comment_form_defaults_mod', 10, 1);
    function avf_comment_form_defaults_mod($args) {
        $args['label_submit'] = __( 'CHANGE THIS TEXT' );
        return $args;
    }

    Best regards,
    Ismael

    #994258
    This reply has been marked as private.
    #994646

    Hi,

    That same css code works on my end. Can we take a look at the post with the comment form? Please provide a mock up or a screenshot of the end result so that we can see what you’re trying to achieve.

    Best regards,
    Ismael

    #994654
    This reply has been marked as private.
    #994678

    Hi,

    Thanks for the update.

    This css code should override the default label styling.

    #commentform label {
        position: relative !important;
        left: 0;
        float: left;
        margin-right: 10px;
    }

    Best regards,
    Ismael

    #994690
    This reply has been marked as private.
    #994847

    Hi ProTravelGolf,

    To make them more or less aligned vertically, they need to have the height of the longest comment, which is 833px. Then all the comment boxes will have a lot of whitespace and users will have to scroll a lot.

    It looks ok now, reminds of a tiles layout.

    Do you want to do that to try to make them the same height?

    Best regards,
    Victoria

    #995061
    This reply has been marked as private.
    #995066
    This reply has been marked as private.
    #995284

    Hi ProTravelGolf,

    Yes, try adding this css code:

    #commentform label {
        float: none;
    }

    Hope it helps.

    Best regards,
    Nikko

    #995357
    This reply has been marked as private.
    #995920
    This reply has been marked as private.
    #995944

    Hi ProTravelGolf,

    I have checked your site and noticed that you don’t have the email field though it’s required by the form.
    Can you try to uncheck Comment author must fill out name and email in Settings > Discussion.
    Hope this helps.

    Best regards,
    Nikko

    #996060
    This reply has been marked as private.
    #996439
    This reply has been marked as private.
    #996455

    Hi ProTravelGolf,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    #golfclub { max-width: 220px;}
    

    As for the other 2 points, unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 30 posts - 1 through 30 (of 33 total)
  • You must be logged in to reply to this topic.