Make WordPress Core

Opened 2 years ago

Last modified 19 months ago

#24064 new enhancement

Allow comment_form() to display the comment field first

Reported by: johnbillion Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.6
Component: Comments Keywords: has-patch ui-feedback
Focuses: template Cc:


Many sites and many third-party comment system providers display the comment field before the name/email/URL fields in comment forms these days.

It would be nice to have any easy option to do this with the comment_form() function. Currently if you want to display the comment field first you'll have to avoid using comment_form() or you'll have to do some crazy CSS or jQuery trickery to move things around. Neither are optimal.

Attachments (2)

24064.patch (1.9 KB) - added by johnbillion 2 years ago.
24064.twentythirteen.patch (520 bytes) - added by johnbillion 2 years ago.

Download all attachments as: .zip

Change History (6)

@johnbillion2 years ago

comment:1 @johnbillion2 years ago

  • Keywords has-patch added

Patch for the comment_field() argument, and example patch showing usage in Twenty Thirteen.

comment:2 @toscho2 years ago

  • Cc info@… added

You can do that with PHP already, no need for JavaScript or CSS. But yes, an easier way would be useful.

comment:3 @sethshoultes2 years ago

  • Keywords ui-feedback added

Tested the 24064.patch and 24064.twentythirteen.patch​ patches and they seem to be working well. However, if possible, you might want to add a little more margin to the top of the "Post Comment" button in the Twenty Thirteen theme. Screenshot: http://www.screencast.com/t/1jxqdIIFb

comment:4 @nacin19 months ago

  • Component changed from Template to Comments
  • Focuses template added
Note: See TracTickets for help on using tickets.