Index.php will style the blog front page.
Single.php will style a single post page
Page.php will style your menu pages or whatever pages you create ( ex. home, contact )
Now, if you want your homepage ( yoururl.com ) to look different than sub directories or other pages ( yoururl.com/contact ), you should create a new php file and call it “homepage.php”. However, you do not have to, you can target the homepage by using the body class in css.
Add this to the homepage.php file at the very top!
Template Name: Home
Remember to choose “Home” in the admin pages template for that particular page.
If you’re using a page called home, on the right hand side of the admin page you will see something that says “Template” with a dropdown box. Choose the correct template.
Yep, it can be pretty easy once you get the hang of it. You can also throw in the loop to that php file and post content inside the admin “pages”. That way you can easily update things instead of editing the homepage.php every time. If this doesn’t make sense I can elaborate more specifically.
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".