The MU forums have moved to WordPress.org

Difference btw Front page and Posts page: (12 posts)

  1. schun
    Member
    Posted 17 years ago #

    Hi,

    Could someone please explain to me whats the difference between Front Page and Posts Page in Reading Options on WPMU admin?

    Front page displays: has two options for "A static page (select below)" - I tried both and not quite sure what "Posts Page" option does..

    thanks!

  2. andrea_r
    Moderator
    Posted 17 years ago #

    That's IF you're using a theme that doesn't use the home.php and you'd rather the main landing page of the blog shows one of your Pages you've created. Like an About page, or signup or whatever.

    I didn't actually notice that was there before. Huh.

  3. suleiman
    Member
    Posted 17 years ago #

    yeah me neither andrea!

    This will allow me to have a simpler layout for the "Home Page" and a site news section where all the clutter goes. Nice!

  4. andrea_r
    Moderator
    Posted 17 years ago #

    I kind of see it as an either/or. You could do it this way OR create a home.php that is stripped down from the blog's layout. Hmmm... interesting possibilities there.

  5. schun
    Member
    Posted 17 years ago #

    Sorry guys, but I still don't get what the difference is between Front Page VS Post Pages. For both drop down, it gives me the same option. It make sense if I select a page in Front Page drop down, that page I selected will be displayed as a homepage of my blog. What about Post Pages..?

  6. philipacamaniac
    Member
    Posted 17 years ago #

    I have a similar question about those features. If you select a page as your Front Page for a given blog, then how can you get to the normal index/blog view of the blog?

    For example, in some cases, when a user first goes to a blog, he should see an "About" page. But the user should still have access to the blog index (aka Main Index Template in the theme). Is there a special URL to get to it? It isn't /blog or /posts. I've tried that.

  7. blogcity
    Member
    Posted 17 years ago #

    I'm trying to get a page to be displayed as the first "article/post" and then below that, latest "posts" - is this possible? So in other words, if this was the layout:

    <static page of my choice>
    <latest post>
    <older post>
    <oldest post>

    Possible? If it has been discussed, please help in finding as I couldnt.

  8. zappoman
    Member
    Posted 17 years ago #

    Ok, so let me start by answering the ORIGINAL question on the thread.

    Schun asks: "Could someone please explain to me whats the difference between Front Page and Posts Page in Reading Options on WPMU admin?"

    The first option, controls which page to show if the user navigates to the base URL for the blog. (That's the front page option). So whatever page you choose here will be displayed when the user navigates to "http://blogname.domain.tld/" if you are using subdomains or "http://domain.tld/blogname/" if you are using subdirectories.

    Simple enough, right? This functionality replaces some of the plugins that used to be required to replace to do front page replacement.
    '
    Ok... Now what about that other option?

    Well, this is kinda crazy, and I didn't know exactly what it did until I looked at the code... but basically, what ever page you set as the "Posts Page" will now, take the functionality of what used to be the home page. What? yeah... trust me, I looked at the code.

    So let's say you made a page "foo" and so if you've never changed these options then the URL "http://blogname.domain.tld/foo" would show that page content. Well, if you go and change that option, then the URL "http://blogname.domain.tld/foo" will now show posts.

    Bonus points for whoever can answer this question: What template page does it use now? (I don't know, I haven't dug through the code yet or tested this... I'll let you know when I find out.)

  9. zappoman
    Member
    Posted 17 years ago #

    The answer is.... (wait for it... wait for it...)

    Ok, so now I just tested this, and discovered some other cool stuff.

    What ever page you set as the "posts" page using this option is now the URL for the home.php from the theme, or in the case of most themes, the default index.php will usually show a "posts" list.

    Basically the magic is all controlled by the get_posts() method in the WP_Query class of query.php. This function basically takes these values and does an alias remapping.

    This all happens very early in the pipeline, and so the theme's handling of home.php or index.php checking if "is_home" etc will act 'normally' which is the say that now the 'normal' URL for the home page whether rendered by home.php or index.php is now done at the remapped URL.

    WOW! How's that for tricky?

    Anyway, I realize that this thread is like 4 months old... but I was just playing around with this myself and had to dig into it to figure out what was going on.

  10. zappoman
    Member
    Posted 17 years ago #

    Blogcity,

    Your question probably warrants a different thread... I think you're asking how to make a home page that shows the contents of fixed "PAGE/POST" and then the latest POSTS as written.

    This could be done pretty easily in a theme by building a home.php. There is quite a lot of documentation on how to do this. I would suggest starting with the wordpress documentation and in particular focus on the description of how to build a theme... you will also need to read about and "understand" 'The Loop'.

    Good luck.

  11. zappoman
    Member
    Posted 17 years ago #

    philipacamaniac,

    I realize that your question is 2 months old, and so you either figured it out, or gave up... BUT... if you still don't know how to do this, here's the answer.

    1) Create a Page, the contents doesn't matter, but make the "page slug" whatever url stub/slug you want to be the location of your posts. So for example, you could make the slug be "posts" or "blog"

    2) Go to this Options->Reading and in the drop down box for "Posts Page" you can now choose your newly created page.

    The contents of this page will never really be accessible. But now if the user goes to "http://blogname.domain.tld/[the slug you used]" then they will see the theme's standard home page, which usually is the posts page.

    Good luck.

  12. blogcity
    Member
    Posted 17 years ago #

    Thanks zappoman :)

About this Topic