• I am using wordpress as a CMS and am using the static home page plugin to have a fixed home page (home.php). Other pages make up my main navigation including a page called blog (blog.php) that i want to be my main entry point to my posts.

    The blog page currently shows the same content as my home.php page although it does show the category and archive links in the sidebar. how do i get this page to show the list of recent posts on its first page as it would do normally? The content for blog.php page contains no content as such so not sure why its picking up the home page content.

    Do i need some code added to the page template to recognise this blog page or do i need to create the blog home page some other way?

Viewing 7 replies - 16 through 22 (of 22 total)
  • hello everyone, this thread is very pretinent and useful. i’ve followed in evvo1961’s footsteps but am stuck somewhere.

    i don’t know what code to put in home.php. i tried using code put out in codex for pages, but doesn’t work. also cut and paste code from pages.php, but still doesn’t work. the problem is that i only half understand (yes, after reading lots of codex) how certain things are done. i also read the loop and templates, but just need some help before it begins to make sense to me and i can do it by myself.

    IMPT: now, i’m at a place where i know how to use the side bars to change what’s shown in the body of the page. but i don’t know how to allow the body to do all the work, like what pcmt was mentioning.

    here are my needs:
    1) i want to be able to link to my pages in home.php, where home is the place where i can just create links to all other pages, sub pages. can someone give me simple set of code for home.php? (i’m modifying kubrick) when it’s given, it’s easier to make sense of it and learn. thanks so much.

    2) i don’t know how to think of home.php in a wordpress context. normally, blogs pop up and that’s due to
    get_post() function. i suppose i have to insert code like get_home() in index.php, and wp_list_pages (since i want to put pages in home) in home.php. but still i don’t really know how to code it. do i put it within the <?php while (have_posts()) : the_post(); ?> loop or where? i’m lost here.

    3) anyone able to give a schema and/or code to help me through these tough times?

    much appreciated.

    I’m not sure what the problems are. The Codex says “WordPress can be configured to use different Page Templates for different Pages. Toward the bottom of the Write->Write Page administration panel is a drop-down labeled “Page Template”. From there you can select which Template will be used when displaying this particular Page.”

    It’s a matter of reading the relevant parts of the Codex, to make a new template (in my case, a Page template) and to configure the WP Loop within that template to display whatever you like, whether it be blog posts or something else. Note that the default page.php already has a loop in it, so just save that as a new template and make a new loop.

    Then create a new Page, selecting that particular template. It needn’t have any content of its own, if you have a suitable loop to retrieve the content you actually want.

    And then for navigation, the WP external links system can be used instead of the “blog-like” sidebar sections for Pages, Categories, and Archives.

    ok, i don’t think i fully understand your answer because i’m very new to this. i’ll streamline my questions to something very specific. the answer to this will help me understand what i need to understand. the first question is:

    let’s say i have a home.php page that i create from notepad. let’s say the code inside is the same as links.php i.e.

    <?php
    /*
    Template Name: HOMEPAGE THAT GIVES EXTERNAL LINKS
    */
    ?>

    <?php get_header(); ?>

    <div id=”content” class=”widecolumn”>

    <h2>Links:</h2>

      <?php get_links_list(); ?>

    </div>

    <?php get_footer(); ?>

    i understand all the code above. i just don’t know how to put a function in index.php that will call up home.php as the front page.

    if i can do the above, then all i need for having a homepage that lists the pages is to use the include_pages() functon that can be installed as a pluggin.

    then i’ll have a homepage (run entirely by wordpress, template included) that links the the pages as i need them.

    thanks.

    I have found the best way to use WordPress as a cms is this:
    1. standard install of WordPress.
    2. get semi-static home page plug in and create a wordpress page (ie in the dashboard, click on write, page, content in that page. Once you enable that plug in the page you created with the title home will become the home page. It is really based on the slug. Once the page is created you can edit it and change the name because the slug will stay the same.
    3. use the fold_page_menu plug in and only have so many base pages and then sub-pages under those main pages.

    Works great for me.

    @marchern: As long as home.php exists WordPress will use that template for the front page. Just make sure it’s in your active theme directory. You can delete the following comment lines. WP doesn’t need them for recognized templates like home.php, index.php, etc.


    <?php
    /*
    Template Name: HOMEPAGE THAT GIVES EXTERNAL LINKS
    */
    ?>

    so i guess that for external links, i’ll just link to my root and the php page that’s in there. yes?

    bestfoot, great site, i’ll read more on it. as for using wordpress as cms, i’ve managed to do it. i’ll go figure the fold_page_menu pluggin

    ming, thanks for the input. i understand now.

    and all, thanks for the input. it really helps give direction.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘wordpress as cms’ is closed to new replies.