WordPress.org

Support

Support » Themes and Templates » comment_form() putting title_reply in H3 tags…

comment_form() putting title_reply in H3 tags…

  • This comment_form() business that WordPress requires should have a callback function…

    Just setting up the fields is more work than writing the entire comments form myself – which I originally did, but WP requires a comments_form() function present.

    After much work I’ve got it roughly how I originally had it, except that it’s automatically putting the title_reply and cancel_reply_link fields in the same h3 element: reply-title

    <h3 id="reply-title">"Leave a reply to "...
    <small>... id="cancel_comment_reply_link" ...</small>
    </h3>

    I don’t want these in the same element, nor do I want them inside a h3.

    How can I get around this?
    Thanks, Tom H.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You can pass comments_form values: http://codex.wordpress.org/Function_Reference/comment_form

    Perhaps that would help?

    Yep, it works for most of the fields but not for the two I mentioned above.
    I took a look at the actual comments-template.php file in wp-includes and it appears to have been hardcoded by wordpress.

    Like so <h3 class="reply-title"><?php echo $fields['reply-title']; ... ?></h3>

    Hence changing the field isn’t going to do anything, I guess the only way is to edit the CSS and mark it all as !important.

    Please do change this WordPress. It’s the only flaw and makes styling very difficult!

    Agree with Emphacy — this does not work as documented in the codex, which gives this example of a comment_form() arg:
    'title_reply'=>'<h4>Send</h4>'
    (codex example)

    thanks for pointing that out;

    Codex edited.

    – as the Codex is a wiki, it might not always be totally accurate at all times.

    alchymyth, you’re welcome, but the example is still incorrect. instead of

    // change the title of send button
            'title_reply'=>'Write a Reply or Comment',

    it should be

    // change the title of send button
            'label_submit'=>'Write a Reply or Comment',

    title_reply is the title that’s displayed above the comment form

    done –

    btw:
    as the Codex docu is a wiki, you can login to the Codex with your user name and password, and edit the entries yourself.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘comment_form() putting title_reply in H3 tags…’ is closed to new replies.
Skip to toolbar