Add Bootstrap Button Classes to the WordPress Comment Form

CSS Hints HOWTOs WordPress

Looking to stylize that WordPress comment button on the WordPress comment form? Adding the correct classes needed to the comment form button are as easy as finding where comment_form() is called in your theme.

In my cases – this is within the comments.php file.

Once you find that – you just need to change
comment_form()
to:

$args = array(
'class_submit' => 'btn btn-default',
);
comment_form($args )

There are a number of modifications you can make to the comment form (changing button text, changing labels, adding notes, etc that you can make with the comment_form() function which are worth looking at here: https://codex.wordpress.org/Function_Reference/comment_form

Leave a Reply

Your email address will not be published.
*
*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

TV

ABC’s The Goldbergs

When I first saw this show advertised I thought to myself “this looks like a great show”…and that was it. FINALLY I caught a few episodes and as expected – I love it. It is based in the 1980s from a young boy’s perspective. Growing up the in 1980s myself – the episodes I watched […]

Apple

Good Ol’ Siri

I love Siri. She helps me with measurement conversion (especially helpful during these Olympics and all the metric conversions), driving directions, game scores, figuring out what song is on, and making sure I remember who I am 😉