[resolved] displaying a Page's content on startup? (9 posts)

  1. mzimmers
    Posted 8 years ago #

    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.

  2. moshu
    Posted 8 years ago #

    admin > Options > Reading
    (and in the same time select one for your posts, too!)

  3. mzimmers
    Posted 8 years ago #

    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"

    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?

  4. moshu
    Posted 8 years ago #

    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.

  5. mzimmers
    Posted 8 years ago #

    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?


  6. moshu
    Posted 8 years ago #

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

  7. mzimmers
    Posted 8 years ago #

    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?

  8. moshu
    Posted 8 years ago #

    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.

  9. mzimmers
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.