Support » Fixing WordPress » How do I put my blog in a directory off of the root?

  • I would like to create a static home page and place my blog in a directory of mysite.com/blog/.

    I followed the directions in this article: Making Your Blog Appear in a Non-Root Folder

    As instructed, I created a blog.php file with formatting to taste. Then a page title blog with the blog.php template selected.

    Permalinks were set to /blog/%postname%/

    Since I’m using WP 3.2.1 I did not create a home.php template.

    However, when viewing the blog it is not using my template. It uses my index.php template.

    Are those instructions wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The instructions on that page load the index.php template.

    //load index to show blog
    load_template(TEMPLATEPATH . '/index.php');

    Based on what you want to achieve, I would probably just install WordPress in the /blog/ directory of your domain.

    I need wordpress to run the whole site. Sorry, I should not have used the term static to describe my home page. It will feature some posts but require it’s own template and formatting.

    I only need posts, not pages, to be located off the /blog/ directory.

    So, to achieve what I need I will have to create another template with my blog page formatting? Meaning my blog.php will call another template?

    I changed the code in my blog.php to call itself and it worked. Is this the best practice?

    Within the blog.php file:

    //load index to show blog
    load_template(TEMPLATEPATH . '/blog.php');

    For my the home or front I need to use a page because I will be using woocommerce and shortcodes in the body.

    Do I create a page of home and call a template?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I put my blog in a directory off of the root?’ is closed to new replies.