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

So, I'm using my wordpress with a static front page and then I have Blog link that opens the blog posts.

My question is, how can I apply a different template/styling only to that area?

share|improve this question
up vote 1 down vote accepted

Refer to the Template Hierarchy in Codex.

If you have assigned a static front page, the template that will take priority for that page is front-page.php, and the template for the posts (blog) page is home.php.

share|improve this answer

You can create a custom template for every page and assign it to that page from edit page screen in the admin.

WP Codex has an example about custom page template for "page of posts". That should fit your needs.


As for just targeting different pages with CSS you can add a body_class() function which prints out a class for body element depending which page is displayed. Add it like this:

<body <?php body_class($class); ?>> 

More information about body_class() function: https://codex.wordpress.org/Function_Reference/body_class

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.