WordPress.org

Ready to get started?Download WordPress

Forums

How do I put my blog in a directory off of the root? (4 posts)

  1. mattmikulla
    Member
    Posted 2 years ago #

    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?

  2. Rachel Baker
    Member
    Posted 2 years ago #

    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.

  3. mattmikulla
    Member
    Posted 2 years ago #

    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?

  4. mattmikulla
    Member
    Posted 2 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.