• Resolved redactuk

    (@redactuk)


    Hey guys,

    Been doing some searching but still not found best solution for this:

    I would like my blog home and posts page to be the same, but I would like it to have it’s own slug (home). So for example:

    http://www.mydomain.com/site1/home

    Reason being that I NEED to create a real subfolder off the domain called ‘site1’ with alternative content in /site1/ and subfolders. Also I have several wordpress sites setup as a network:
    I have created a WordPress network setup as follows:

    mydomain.com/
    mydomain.com/site1
    mydomain.com/site2
    mydomain.com/site3

    So by default entering URL mydomain.com/site1/anypage.html will always return ‘page not found’ in WordPress.

    So, to achieve this I first got my theme’s index.php as I wanted it, then cloned it calling the new one front-page.php. In the Admin area I then created a page called ‘Home’ (no content), then went to Settings > Reading and changed ‘Front page displays’ to ‘Static’ and set BOTH Front page and Posts page to my new page called ‘Home’. Finally created an index.php in my real /site1/ folder with:

    [code]
    <?php
    header("Location: ../site1/home");
    ?>
    [code]

    Result? seems to work perfectly as far as I can see... entering http://www.mydomain.com/site1 redirects to http://www.mydomain.com/site1/home showing my front page with posts, and entering http://www.mydomain.com/site1/anypage.html takes me to that non-Wordpress page as I want.

    The only thing is that in WordPress under Settings > Reading after making the change I get 'Warning: these pages should not be the same!' Is there any harm in leaving that message or better still working around it with better solution to what i want to achieve?

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter redactuk

    (@redactuk)

    Anyone?

    I guess my main question is does it matter that WordPress is warning me I’m using same page as static home page and posts?

    Yes. If you want to use a static Page but still want to show Posts in that Page, see a page of posts.

    Thread Starter redactuk

    (@redactuk)

    Well that’s basically what I’ve done by creating front-page.php. so in effect all I need to do is under ‘Front page displays; set:

    Static page = yes
    Front page = None (leave it as -select-)
    Posts page = Home

    and presumably then WP can’ find static page so goes to Home page

    No. You need to set Home as your static front page and set your Posts page to something else.

    Thread Starter redactuk

    (@redactuk)

    But I don’t WANT another posts page! when will other page post be displayed?

    create a new page in your dashboard and call it “Home” after you save that (still being in your dashboard) go to Settings then click Reading. Now you should be on the “reading settings page” at the top where it says “Front page Displays” make sure the “A static page” is selected, in the drop down for “Front page” select the home page you created. Then in the dropdown for “Posts page” also select the home page you created. This will now be used as your home page/posts page.

    Thread Starter redactuk

    (@redactuk)

    create a new page in your dashboard and call it “Home” after you save that (still being in your dashboard) go to Settings then click Reading. Now you should be on the “reading settings page” at the top where it says “Front page Displays” make sure the “A static page” is selected, in the drop down for “Front page” select the home page you created. Then in the dropdown for “Posts page” also select the home page you created. This will now be used as your home page/posts page.

    Yes that works, as that is what i had before. My question is can i ignore the fact WP reports warning with both these set to the same page? (even though it seems to work just fine)

    If it works then yea just use it, its just warning you for the sake of letting you know you have your posts page set to your home page.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Same front page and posts page with slug’ is closed to new replies.