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 am newbie to wordpress and just started to play with themes. My problem is I want to change the css of the content part and for that I want to know by default the content comes in the blog page comes from which page. I made echo from many pages but not got any result. Can any one tell me all the contents comes from which page?

share|improve this question

I'll refer you to the excellent template hierarchy diagram from the Codex, which explains how template files are chosen:

WordPress template hierarchy

That explains the "which page" aspect of your question, but you also mentioned modifying CSS based on content. The body_class() function should be a part of your template, and it will apply a number of classes to the <body> tag which allow you to target CSS at specific types of content. For example, given a category "spooky," this CSS rule would give all "spooky" pages a black background:

.category-spooky { background-color: #000; }

Many other variations exist, for other types of targeting.

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.