Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.