comment_form() putting title_reply in H3 tags... (7 posts)

  1. Emphacy
    Posted 2 years ago #

    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>

    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.

  2. Tammie
    Posted 2 years ago #

    You can pass comments_form values: http://codex.wordpress.org/Function_Reference/comment_form

    Perhaps that would help?

  3. Emphacy
    Posted 2 years ago #

    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!

  4. yitwail
    Posted 2 years ago #

    Agree with Emphacy -- this does not work as documented in the codex, which gives this example of a comment_form() arg:
    (codex example)

  5. thanks for pointing that out;

    Codex edited.

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

  6. yitwail
    Posted 2 years ago #

    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

  7. done -

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

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.