Make a frontpage with your own code
-
Hello one and all.
I have a fairly new installation of WordPress up on my server. I have made a new folder in my themes folder and it is a child theme of the twentyeleven theme. In here i have the new css file which references the mother theme, with some small tweaks made to the mother theme.
Here is the link to my site. https://www.gotodesigns.co.uk/
Now, what is leading to much confusion for me, and is making me run round in circles chasing my tail like a possessed mad dog, is this..
I would like to be able to make the landing/home page, or lets say the content between the header and footer on the landing page, as a normal website, in this sense i mean i would like to deploy a two column layout below the header with a full width column above this, you will see what i`m trying to achieve by a brief visit to my sites homepage.
Now, i have put this markup, the three divs/containers you can see on the homepage within the “page” i created when i first adjusted the reading settings to front page displays – Home (which i created in the usual fashion of adding the page in add pages..)And then setting the Blog page to Blog, also created in this fashion, which is fine as i would like blog functionality.
Now i am aware that when i adjust the reading settings this way that the front page will use the page.php template file to display the homepage, i am happy with all this so far.
What i am wondering is if this is usual practice to hard-code within a page that has been added through add pages or wether it is better practice to create a fresh php template page and call it “home.php” or “front-page.php” So that when you want to make any changes to page.php, should you ever need to, it wont affect the layout or conflict with any other parts within wordpress that rely on page.php, and if so, what loop/wordpress functionality would/should be included in the file. Because i noticed that when i use firebug to go through the code in browser, within the page template currently being used, there is the #content role=”main” container there is a reference to a article/post:
<article id=”post-5″ class=”post-5 page type-page status-publish hentry”>
And also entry-content, entry-header divs, this is going to interfere with things going forward right? As its using the page.php within my code.In essence what i am trying to achieve here is to be able to have a working reliable template i can work from each time i make a new install so i can start working straight away without having to start from scratch. One which has a traditional look and feel to the homepage, as opposed to the blog look, but one where i can have use WordPress functionality such as pull in latest post feeds to the homepage into a container of my making.
I hope this makes some sense, i know i`m not the first person that wants to or has achieved this as i look at all the great and unique looking WP builds online today.
Many kind regards
Maracas1970
- The topic ‘Make a frontpage with your own code’ is closed to new replies.