• I am using WordPress as a CMS, following the instructions here.

    I’ve downloaded the Static Front Page plugin and have set it up successfully.

    I would also like the blog section of the site to appear in a non-root folder, i.e. https://example.com/blog. I’ve followed the instructions under the CMS setup instructions (first link above) and have found that this only works when the Static Front Page plugin is disabled.

    I know I could use a splash page as an entry point to my site, however as far as I can tell, this wouldn’t be integrated into the admin panels and really I want the front page to be navigable within the site (i.e. not just a one-off welcome screen).

    Is there any way of making this work? i.e. I want a static front page, ideally managed as a Page within WordPress, and also have the blog under a non-root folder at the same time.

    Many thanks,
    Steve

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Swinton,

    I haven’t read the CMS page you are referring too, but I think I would try the following:

    create the “home” page with static plugin. This will use the page.php template file. Then create a category “blog”. These are normal posts so they will use the normal index.php template. Use permalings so they will show up as /blog/. Only create subcategories under this category blog.

    Now, if you need to display all categories in your sidebar, make sure you display only subcategories from “blog” so it won’t appear like blog is only a subcategory.

    I have the exact same question as you. Post your answer if you find it. I suspect we need to modify the plugin.

    I found a solution but it does not involve Static Front Page. I’m using Get-A-Post ( https://tinyurl.com/qyqsj).

    Create a page called Home and attach a template called home.php like this:

    < ?php
    /*
    Template Name: home
    */
    ?>

    < ?php get_header(); ?>

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

    < ?php get_a_post(‘5’); ?>

    < ?php the_content(); ?>

    </div>

    < ?php get_sidebar(); ?>

    < ?php get_footer(); ?>

    Then create a page called Blog and attach the index.php for a template.

    Note: I had a problem and had to edit the plugin. See my comments at the above link.

    Actually, correction of above instructions. I did not attach the index.php template directly to the Blog page. I created a template called blog.php as per the instructions here.

    Scroll down to “Making your blog appear in a non-root folder”:

    < ?php
    /*
    Template Name: Blog
    */
    ?>
    < ?php query_posts(‘cat=-0’); //gets all posts load_template( TEMPLATEPATH . ‘/index.php’); //loads index ?>

    Again, I was able to accomplish exactly what I (and apparently you, swinton) was trying to accomplish using the Static Front Page plugin.

    Thread Starter swinton

    (@swinton)

    Hi freelantz

    Yes, I (eventually!) came to the same conclusion myself. I had to modify blog.php though to pass the paged parameter to query_posts, i.e.

    <?php
    /*
    Template Name: Blog
    */
    // Which page of the blog are we on?
    $paged = get_query_var('paged');
    query_posts('cat=-0&paged='.$paged);
    load_template(TEMPLATEPATH . '/index.php'); //loads index
    ?>

    I wrote a simple tutorial about this. When you know the trick it is easy. Check it out, including sample theme. https://www.bos89.nl/1088/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress as a CMS’ is closed to new replies.