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?
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?
You must be logged in to post a comment.
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 ishome.php
.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.
http://codex.wordpress.org/Pages#A_Page_of_Posts
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:More information about
body_class()
function: https://codex.wordpress.org/Function_Reference/body_class