Create a static page for Homepage
-
Hi,
I know there were a lot of discussions in here about making a static page for main homepage of blog. I had gone through them but just got more confused. I’ve tried some suggestions (some from other forums) but ended up with blank homepage.
What I wanted to have is a static page to replace my current homepage:with 5 latest posts’ (featured images and excerpts). Below it will be 5 featured post (linked featured images).
Here’s what I did (I thought what I understood from reading the suggestions including from codex site).
Step 1 : I created a page template which I named frontpage.php. I copy the code from index.php under my file manager > public > theme > fashionista (i am using fashionista) to the frontpage.php which I created. Also I had put the <?php /* Template Name: Frontpage */ ?> at the top of the file codes.
Step 2 : Saving the frontpage.php in child theme folder.
Step 3 : Went back to WordPress and created a page called Home and set to Frontpage Template.
Step 4 : Went to WordPress setting and choose static page Home.
Now my homepage is blank but with the header and sidebars intact.
So I continue to search for loop for latest posts. Tried to paste some loop code as suggested. I am actually confused where to put the loop code in the frontpage.php but trial and error a few times, still gets nothing.
I continued searching and came across wordpress query, totally lost with it.
What can I do to get a static page with latest posts and featured posts?
Thanks.
The topic ‘Create a static page for Homepage’ is closed to new replies.