How do I add a class to the comment submit button? The simplified function
comment_form(array('id_submit'=>'buttonPro')); obviously only changes the id and
class_submit does not seem to exist.
If you check out the source of the function
I'm guessing you need to add a class for styling? Why not modify your CSS to just;
Otherwise I guess the 'easiest' solution would be to simply copy the function to your
Why do you need a class on the submit button? You can give it an ID, as you have discovered, and that's all you need for styling it.
Then to style it:
Simple. Or, if you prefer to use classes only for some reason:
There's no advantage I can see, from any angle, to putting a class on the comment form's submit button.
I'm going to reply (late) since I was looking for an answer to this and decided to tackle it myself.
First, to answer the question "why add a class?"... In my case, I chose to use a UI framework called Foundation to design my most recent theme for my personal blog. I chose it precisely because I like its style for buttons. However, it requires the developer to add a class to an
So, here's what I did. I had to edit the
Then change line
Now you have a new default value called
I suggest those who have this problem to set a style for "post-comment" id, like what i did:
good luck! :)
I'm working with the Foundation framework as well. I've found that the easiest way to add a class to a non-filterable element is to do it with jQuery.