Forums

[resolved] Different Front Page Design to Second Page (5 posts)

  1. blackmane101
    Member
    Posted 3 years ago #

    Hey

    I'm having a little trouble and I can't seem to find an answer that works, i've searched every where.

    What I want to do is have the front page at http://www.example.com to display a certain page design. Then when a user clicks on older posts and ends up on http://www.example.com/page/2 it displays a different page design. Both pages have a loop, so the front page shows the first 8 posts and then the second, third etc pages show the rest of the posts.

    I've tried using the static page in the settings but that doesn't do what I want. I have a feeling that it uses the conditional tags but I don't know how to use them fully.

    I hope I am clear enough in what I want to do. I feel there is a simple option to this. Thanks for your help.

  2. Samuel B
    moderator
    Posted 3 years ago #

  3. blackmane101
    Member
    Posted 3 years ago #

    Thanks samboll, I already have multiple loops on one page to display the posts in different places, but that still doesn't explain how you can change the design completely for page 2.

  4. blackmane101
    Member
    Posted 3 years ago #

    I have found the solution to my problem. What you need to do for any future readers is this.

    Add in at the very top of you home.php

    <?php if (is_home() && !is_paged()) {>
    Then you front page design with the loops etc.
    <?php } else }?>
    Then your second page design.
    <?php }?>

    You could probably repeat this using other condition tags.

  5. gnorb
    Member
    Posted 3 years ago #

    Just used this code to do something similar. Works beautifully.

Topic Closed

This topic has been closed to new replies.

About this Topic