WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anybody know predefined (suggested by WP) CSS classes which should I use in my theme?

I have seen somewhere in Internet a list of all CSS classes, which are used in WP theme, but can't find it.

UPDATE: I have found the site where I've seen this list: http://www.wpbeginner.com/wp-themes/default-wordpress-generated-css-cheat-sheet-for-beginners/

share|improve this question
up vote 13 down vote accepted

There are many CSS classes generated by WordPress, depending on context.

The Theme Review Guidelines include the following, WordPress-generated CSS classes:

  • Alignment Classes:
    • .aligncenter
    • .alignleft
    • .alignright
  • Caption Related Classes:
    • .wp-caption
    • .wp-caption-text
    • .gallery-caption
  • Post Classes:
    • .sticky
  • Comment Classes:
    • .bypostauthor

Then, there are the body classes generated by body_class().

Then, there are the post classes generated by post_class().

Then, there are the comment classes generated by comment_class().

Then, there are the menu item classes generated by wp_nav_menu().

share|improve this answer
didn't you just finish rewriting sections of the Codex on this very subject? How timely! – Tom Auger May 9 '12 at 12:37

I found this list, which appears to be pretty comprehensive:


(I'm aware that an answer consisting of a link to an external site is discouraged, but not sure what else to do in this case?)

share|improve this answer
+1 copy/paste source wouldn't help as it would maybe exceed an answer. – kaiser May 4 '12 at 16:35

Maybe will be useful information from the Codex. Styling List with CSS

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.