• Resolved mzimmers

    (@mzimmers)


    Hi, all –

    I realize that this must be a ridiculously easy question, but I can’t find the answer in the codex.

    How do you display a Page (its content, not just its name) upon startup?

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • admin > Options > Reading
    frontpage
    (and in the same time select one for your posts, too!)

    Thread Starter mzimmers

    (@mzimmers)

    Fascinating…thank you, Moshu. I did see this in the codex about Pages:

    WordPress will look for several template files in your active Theme. The first one it finds will be used to display any given Page. Below is the order of files WordPress will look for:

    The Page’s selected “Page Template”
    page.php
    index.php

    Is that really true – it will go to page.php before index.php? I ask because I don’t see anything in my particular page.php file that WP can hook into to make this happen. I guess maybe it’s more WP behind-the-scenes magic?

    The Codex is true – in general.

    The feature I described above is something new! It did not exist at the time when the Codex article was written.
    You don’t have to worry about the code in your page.php template file. Just select a Page – and WP does the rest.

    However, just to make this stuff a bit more complicated:
    you can have a bunch of Page template files in your theme (besides the default page.php) and while writing a Page you can select which template to use to display it.

    This custom template + the newest feature (selecting the front) is used in this tutorial about dynamic frontpage.

    Thread Starter mzimmers

    (@mzimmers)

    I’ll take a look at that tutorial soon.

    I guess the greater question here is, does WP’s user model sort of assume that, in general, Pages must be clicked on to be displayed? The solution you provided above is exactly what I need, but what if I want to just display a Page out of the blue? Is there a call for that?

    Thanks…

    but what if I want to just display a Page out of the blue?
    You will have to explain this… Out of blue where?

    Thread Starter mzimmers

    (@mzimmers)

    Oops…sorry. “Out of the blue” is slang for something unexpected or unsolicited.

    What I meant was, it seems that in WP, content is generally displayed when a user clicks on a link. The front page feature you mention above is an exception. What I was asking was, is there a way to display pages without a user clicking on a link to them? In other words, is there any other way to access the Pages in the WP data base?

    I know what that slang phrase means…

    I just can’t imagine anything on the web being displayed “out of the blue”.

    Nothing is displayed without clicking on a link (except the unwanted popups…)

    OK, give up on being technical. Describe WHAT is the end goal, what do you want to achieve – and somebody might be able to tell you the HOW.

    Thread Starter mzimmers

    (@mzimmers)

    After giving it a little thought, I suppose you’re right — the only time I would need this is for the opening Page.

    Anyway, you answered my original question, so thank you and I’ll mark this as resolved. And NOW I’m ready to act on your suggestion of a few days ago and google for styling nested links! Thanks, Moshu.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘displaying a Page’s content on startup?’ is closed to new replies.