WordPress.org

Ready to get started?Download WordPress

Forums

WP pages in different directories (8 posts)

  1. stillachild
    Member
    Posted 8 years ago #

    okay, I have wordpress installed here:
    http://strawberry-pie.com/wp/

    my index.php and everything is in that directory.
    what I would like to do is have another index.php here:
    http://strawberry-pie.com/stillachild/

    which would display only one category from my main blog. I would also like that directory to have its own "archives" page displaying a list of posts in that category, and both these pages to use a template different than the template I use on my main blog.

    I realize I could install another wordpress into /stillachild/ and just cross-post into that... but if what I said above isn't as complicated as it seems, it would be better. thanks!

  2. loafer
    Member
    Posted 8 years ago #

    Try using mod_rewrite

    In that folder put a file called .htaccess containing (note that you'll need show hidden files switch on in your ftp client)

    RewriteEngine on
    #RewriteRule Pattern Substitute (Optional Flags)
    RewriteRule /stillachild/(.*) /wp/index.php/category/catname/$1

    Your mileage may vary though.

  3. stillachild
    Member
    Posted 8 years ago #

    I've never used mod_rewrite before.. I created a .htaccess file in /stillachild/ and put what you said in there (or did you mean the .htaccess in my root dir?) but I'm not sure it did anything..

    what I'm trying to do first is basically put another regular index in /stillachild/. that index.php source is:

    <?php
    /* Short and sweet */
    require('http://www.strawberry-pie.com/wp/wp-blog-header.php');
    ?>

    <?php
    get_header();
    if (have_posts()) :
    while (have_posts()) :
    the_post();
    the_content();
    endwhile;
    endif;
    get_sidebar();
    get_footer();
    ?>

    but when I load the page I get:

    Fatal error: Call to undefined function: get_header() in /home/strawbe/public_html/stillachild/index.php on line 7

    so, how would I use WP template tags in this index.php?

  4. loafer
    Member
    Posted 8 years ago #

    sorry, yes in the root.

    Have a look over this site for more examples : http://www.4webhelp.net/tutorials/misc/mod_rewrite.php :)

  5. stillachild
    Member
    Posted 8 years ago #

    I don't know, it's not working. I understand the tutorial though. However, I'm not using the user-friendly URLs under Permalink Structure on wordpress. I'm also not sure if mod_rewrite is installed on my server, but I just emailed them asking, and my server is Apache 1.3.33 so I think it probably does.

    I want to just get a regular index.php working in /stillachild/, and deal with displaying only certain categories afterwards, since I do have some clue as to how to do that. but I'm starting to think maybe it'd just be easier to install another wordpress..? but then, would I be able to automatically cross-post a post into both blogs?

  6. stillachild
    Member
    Posted 8 years ago #

    ok I've found other posts where people are having the same problem, but no solutions and they're very outdated. at this point, all I want to do is have a blog in a directory parallel to where wp is installed. so..

    wordpress is installed here:
    http://strawberry-pie.com/wp/

    I want my blog (index.php) to go here:
    http://strawberry-pie.com/stillachild/

    I've changed the blog URL under admin options, copied index.php to /stillachild/, but it doesn't work. when index.php is in the ROOT directory, it works, but that's not what I want. right now all I get from http://strawberry-pie.com/stillachild/index.php is a blank page.

  7. ext212
    Member
    Posted 8 years ago #

    I've moved from MT to WP and my WP is installed in http://pabulum.ext212.com/wp. Now that I have everything set up, I want the URL http://pabulum.ext212.com/ to show my new WP blog but I get this error:

    meta http-equiv="Content-Type" content="text/html; charset=
    Fatal error: Call to undefined function: bloginfo() in /home/.caviar/genrice/pabulum.ext212.com/index.php on line 4

    What do I do to make my blog show up outside of the /wp folder? I've changed the URL under Options and read this http://wordpress.org/docs/installation/different-address/ but I don't see blog-header in my index.php...

  8. ext212
    Member
    Posted 8 years ago #

    Oh, oh, oh. I uploaded index.php from WP folder, not the themes folder I've been working on. My blog works now: http://pabulum.ext212.com/

    I also had to change search.php to the new URL to make it work.

    Goodbye Movabletype!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.