How to implement front-page.php properly
-
Disclaimer: I am completely new to WordPress. Don’t bite me please.
I think I’m finally grasping the template hierarchy, but I’m struggling to wrap my head around front-page.php and how to properly implement it. I know what it’s for – A static home page. I also understand that WordPress is entirely dynamic so I don’t think I have this implemented incorrectly.
At the moment my front-page.php is entirely hard-coded and designed the way I want it to look. Custom spacing, different font-sizes, etc. This means it is not possible to edit the home page from within WordPress itself. I am assuming this is not correct. I believe the correct way of implementing this is to have front-page.php use a function to output the contents of the ‘Front Page’ that I create from within the GUI?
If this is correct, this leads me to some further questions –
1. How do I style the front page to my liking, i.e. custom background images on each div, left-alligned in some section, right-alligned in others? I think this is my stumbling block..2. Themes are supposed to be somewhat generic. Perhaps generic isn’t the right word to use – Each element should be given a custom style within styles.css and this will be applied throughout the site. Let’s say for example I have one specific paragraph I want to have left-alligned white font. Another paragraph I want right-alligned black font. Another paragraph I want to have selfie.png as the background image. This is further confusing me.
The topic ‘How to implement front-page.php properly’ is closed to new replies.