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

I was wondering if all wordpress theme have a similar class name for the content.. For example I know the class for post/content in the twenty ten and twenty eleven is


if not then how would I go about referring contents for all theme using jQuery?

e.g $j('.entry-content').css('color','red');


share|improve this question
Perhaps a better question would be: what are you trying to do, that you need to target all post content? If your ultimate goal is to change the foreground color of all post content to red,you should edit your question to ask that question instead. Using jQuery is but one of many implementations to solve a given problem. – Chip Bennett Jun 15 '12 at 13:52
up vote 3 down vote accepted

There is no mandatory class name for posts. Many themes use the post_class() if that is needed but you cannot rely on it.

To change the output of the_content() add a filter to 'the_content'.

share|improve this answer

This is basically an attempt at marking up web content in hAtom or hNews (an extension of hAtom). The entry-content class doesn't get assigned to the whole post but only to the body text, without title (which is entry-title). So it isn't really a replacement for the_post_class() because that gets assigned to the whole post. But for entry-content to make sense, the article needs a class of hentry. So using the_post_class(), it would be the_post_class('hentry') to include this class in the output.

And it has a very practical use: this markup has been established as kind of a standard for all those web services crawling and reformatting content, like Instapaper, Readability, Pocket etc. All those services use hAtom markup to identify the correct portions of an article. See Readability's Article Publishing Guidelines for a full example.

share|improve this answer

You really can't tell.

If you're writing a plugin I'd say the safe way to go is to create an options page where the user can set the classname to use, and if none is set, use .entry-content

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.