WordPress.org

Ready to get started?Download WordPress

Forums

Add class to the submit button of comment_form() (3 posts)

  1. philipwalton
    Member
    Posted 3 years ago #

    I know that I can change the id of the submit button by passing the argument 'id_form' => 'customID', but I want to also add a class. Is there a filter where I can do this or some other method that doesn't involve editing wp-includes/comment-template.php?

    I know I can style everything the way I want using the id for the submit button, but I want to use a class. I have several helper classes like "rounded" and "shadow" and whatnot where adding a class to an item is much easier than typing out the same browser-specific CSS rules every time.

  2. curlybracket
    Member
    Posted 3 years ago #

    Wait a sec, edit wp-includes/*.php ? You should only edit your theme's comment template. There you can add whatever ID you want.

  3. philipwalton
    Member
    Posted 3 years ago #

    Veganist, unless I'm completely missing something, no where in a theme can you set the markup for the comment form. I don't know why, but you can't.

    If you know otherwise, let me know.

Topic Closed

This topic has been closed to new replies.

About this Topic