WordPress.org

Ready to get started?Download WordPress

Forums

Static Homepage (WordPress as CMS) (8 posts)

  1. Emery
    Member
    Posted 6 years ago #

    In WordPress 2.2.3 I'm trying to use a static homepage. I created two pages, "Home" and "Blog" and under Options->Reading I set these as the front page and posts page, respectively. However... when I go to the home page it doesn't load a home.php if there is one, but rather the "Blog" posts page DOES. And in any event, the posts page doesn't have the current_page_item class in a wp_list_pages generated navigation.

    Bugs?

  2. moshu
    Member
    Posted 6 years ago #

    Try to rename the 'home.php' to something else and make it a real Page template (see Pages).

  3. yeleek
    Member
    Posted 6 years ago #

    Bugs - no.

    http://codex.wordpress.org/Pages
    http://codex.wordpress.org/Templates

    Home - home will not become a home.php file, it will be content pulled in directly from your wp database dynamically based on the template you use (see link).

    Blog - Why create a page?? If you want a webpage to return all posts (and i'm guessing this is what you want) posted to the blog category. Then have a link for that category not a specific WP page.
    http://codex.wordpress.org/Category_Templates

  4. Emery
    Member
    Posted 6 years ago #

    I figured you are supposed to create a blog page because Options->Reading has a drop-down list for selecting the "Posts page". What is that for if not a page that contains the blog posts?

  5. yeleek
    Member
    Posted 6 years ago #

    Its for a page that displays your posts - but you'd need to add the template tags to that specific template file so as to pull in your posts from the various categories - which could get complex.

    Easier to have a link on your front page that links to http://domain/category/blog/

    Read the codex - it will make sense.

  6. moshu
    Member
    Posted 6 years ago #

    Its for a page that displays your posts - but you'd need to add the template tags to that specific template file so as to pull in your posts from the various categories - which could get complex.

    Not true. Any Page selected in the Reading options as "posts page" will display all your posts. No need for messing around with template files. Just have a Page created to use it.

  7. yeleek
    Member
    Posted 6 years ago #

    How would the page get the posts for the blog category in this instance though if not via the use of tags? i.e. rather than pull in all posts, pulls in the blog posts?

  8. yeleek
    Member
    Posted 6 years ago #

    Gave the page to display posts a try, it displays from all categories. You'll have to wait for Moshu to reply to see how you could get just blog posts to appear on that page. Unless of course you only have a blog category?

    In the meantime I'd still go with a blog category link from the front page. Its what i've done on the CMS i'm working on.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.