• nee

    (@nee)


    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.

Viewing 1 replies (of 1 total)
  • Colin McDermott

    (@woodsandhillsplc)

    If you are having difficulty, I am going to suggest a way you could do this that would be 10 times easier and not technical at all.

    First just change you homepage back to normal, so that it works in blog format.

    This means most likely it will display your 10 latest posts, depending on the theme.

    Then – to select your featured posts – just save the posts as “Sticky” and they will display at the top of the page.

    Alternatively you could choose a theme that has more flexible ways of adjusting the homepage.

Viewing 1 replies (of 1 total)

The topic ‘Create a static page for Homepage’ is closed to new replies.