• Resolved jduffell

    (@jduffell)


    Hi, customized my index.php to dispaly the most recent post only, however this has done the same to my blog page, which I wish to show 5 of the most recent posts.

    Is there anyway to make the homepage show 1 post whilst having a dedicated page set to display the blog show 5 posts.

    Cheers for any help

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think you want to do this:

    1. Rename your modified index.php to frontpage.php and insert the following at the top:
      <?php
      /**
      Template Name: frontpage
      */
    2. Restore the original index.php
    3. Create a new Page and use frontpage as its template
    4. Make your new page the Static Home page in Admin->Settings->Reading

    Depending on your theme, you may get two ‘Home’ pages in your menu. If your theme has an option to not display the default ‘Home’, use that. If not, you may need to edit your header.php file. I can’t answer that without a link to your site and access to your theme’s code.

    Thread Starter jduffell

    (@jduffell)

    @vtxyzzy you are a star, i did something similar earlier but set the template to apply to the blog page instead of the static page.

    Thanks for your help

    You are welcome. Please use the dropdown at top right to mark this topic ‘Resolved’.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display 1 post on the homepage’ is closed to new replies.