Changing "Speak your mind" Comment Title

Community Forums Forums Design Tips and Tricks Changing "Speak your mind" Comment Title

This topic is: resolved

This topic contains 3 replies, has 3 voices, and was last updated by  Chikako 1 year, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10522

    Chikako
    Participant
    Post count: 2

    Hi,

    I tried to change the “Speak your mind” comment title by copying the snippet posted on http://my.studiopress.com/snippets/comments/#speak-your-mind but got an error and had to restore the file from backup even though I didn’t change anything in the code.

    When I checked the syntax of the snippet, I got the following errors:

    Lexical error at line 1, column 144.  Encountered: “a” (97), after : “$”  custom_comment_form_args(args) {args['title_reply'] = ‘Leave a Comment’;

    Lexical error at line 1, column 208.  Encountered: “a” (97), after : “$”  rgs;

    Please let me know the correct code.

    Thank you.

     

     

    #10526

    Susan
    Moderator
    Post count: 7449

    That is the correct code. I just tested it myself.

    Although it’s hard to tell from this forum, you need to make sure that any quotes need to be plain text quotes

    /** Modify the speak your mind text */
    add_filter( 'genesis_comment_form_args', 'custom_comment_form_args' );
    function custom_comment_form_args($args) {
        $args['title_reply'] = 'Leave a Comment';
        return $args;
    }
    
    
    

    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #10532

    Bill Murray
    Participant
    Post count: 572

    The snippet APPEARS to have an error. Note the apparently missing _ from the 1st parameter of the add_filter() line. I say “appears” because the _ characters are there; they’re just not displaying. If you copied and pasted the code, it should have copied the _ characters. Below is the correct code:

    /** Modify the speak your mind text */
    add_filter( 'genesis_comment_form_args', 'custom_comment_form_args' );
    function custom_comment_form_args($args) {
        $args['title_reply'] = 'Leave a Comment';
        return $args;
    }
    }
    

    You may find it easier to grab and activate Nick’s Genesis Simple Comments. It will do this and much more.


    Web: http://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #10547

    Chikako
    Participant
    Post count: 2

    Thank you so much for the quick responses.  I will try Nick’s Genesis Simple Comments instead since I don’t know much about CSS.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Changing "Speak your mind" Comment Title’ is closed to new replies.