[Resolved] Editing WordPress template files

Home Forums Support [Resolved] Editing WordPress template files

Home Forums Support Editing WordPress template files

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #699601
    Janine

    Hi.

    Would what template I would have to open to edit the text in the image? This text appears below the comment box and above the Post Comment button. Thank you!

    Here’s the link: https://drive.google.com/open?id=1b_2ssaY6igauy1LXWlPbtBvnw6dBjlHq

    #699806
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Which one are you wanting to edit? Both?

    #699995
    Janine

    Hi, Tom.

    I would like to be able to edit both? Thank you!

    #700211
    Tom
    Lead Developer
    Lead Developer

    For the “save my name” text, you could try this:

    add_filter( 'comment_form_default_fields', function( $field ) {
        $commenter = wp_get_current_commenter();
    
        $consent   = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"';
    
        $fields['cookies'] = '<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' . '<label for="wp-comment-cookies-consent">TEXT FOR CHECKBOX HERE</label></p>';
    
        return $fields;
    }, 20 );

    I’m not sure about the subscribe text, unfortunately. Is that being added by a plugin?

    #700226
    Janine

    No, it isn’t plug-in. I use the native WordPress commenting system.

    How would I use the code above? When I add it to Additional CSS in the Customizer, it has errors. Or, is it a function?

    Thanks, Tom.

    #700453
    Tom
    Lead Developer
    Lead Developer

    Strange, that checkbox shouldn’t be there by default. Do you have Jetpack installed?

    That code can be added using one of these methods: https://docs.generatepress.com/article/adding-php/

    #700580
    Janine

    Hi, Tom.

    No, JetPack installed. I do have Akismet installed. Thank you.

    #700757
    Tom
    Lead Developer
    Lead Developer
    #700862
    Janine

    Thanks, Tom.

    #700998
    Tom
    Lead Developer
    Lead Developer

    No problem. Let me know if you figure out where the checkbox is coming from and I might be able to help change the text 🙂

    #701018
    Janine

    Hi, Tom. I will.

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