WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pages in root, posts in folder (8 posts)

  1. rena17
    Member
    Posted 7 years ago #

    Hi,

    I have been poking through the codex, forums and plugins for days; please forgive me if this is answered somewhere as I can't find it.

    I have WordPress installed in its own /wordpress directory with a number of static pages as well as posts. I use templates including index.php, home.php and page.php.

    I would like all the static pages, including Home, to *appear* to be in the root. I would like the posts, including the blog index, to continue to appear to be in a subfolder. So I want Home to function as the *site* home, and index to function as the *blog* home (showing the most recent posts).

    So for example the URLs the visitor would see would be:

    Home: - http://www.domain.com (pointing to what is now http://www.domain.com/wordpress/home using home template)

    About Us: - http://www.domain.com/about or http://www.domain.com/about.php
    (pointing to what is now http://www.domain.com/wordpress/about using page template)

    Contact Us: - http://www.domain.com/contact or http://www.domain.com/contact.php
    (pointing to what is now http://www.domain.com/wordpress/contact using page template)

    ... and then...
    Blog: - http://www.domain.com/wordpress or http://www.domain.com/wordpress/index.php - which is its actual url now.

    Just to be clear, I do want the static pages to continue to call the header, sidebar and footer, just to appear to the visitor to be in root.

    Not to be too demanding :-) but it would help a lot if the process of showing people the wordpress home.php as the *site* root was SEO friendly.

    Thanks :-)

  2. moshu
    Member
    Posted 7 years ago #

    It doesn't work like that.

  3. vkaryl
    Member
    Posted 7 years ago #

    If I wanted something like this, I'd simply set up normal html pages in the root to do what I wanted done with them; then leave wp alone to do what it does best: dynamic content provided by posts.

  4. rena17
    Member
    Posted 7 years ago #

    Thank you. I feel better now, knowing that I am not missing anything.

  5. whooami
    Member
    Posted 7 years ago #

    I cant speak to how you doing this specifically, given where youve installed WP -- however :

    Contact Us: - http://www.domain.com/contact or http://www.domain.com/contact.php
    (pointing to what is now http://www.domain.com/wordpress/contact using page template)

    thats just a matter of using the correct mod_rewrite rules to accomplish cruft free urls.

    My whole site does that.

    In fact, it would take more work than im willing to do but I dont see why any of that couldnt be accomplished using mod_rewrite.

    of course, with your mentioning of static pages, etc.. maybe not. :P

  6. rena17
    Member
    Posted 7 years ago #

    vkaryl: the "static" pages still need to pull in the dynamic WP sidebar (and header and footer).

    whoami: thanks. It's on IIS shared hosting so no mod_rewrite or .htaccess.

    It sounds like the answer is: it is possible but requires a lot of kludging at the present time, like you it's more work thsan I'm willing to do. Perhaps someone can be enticed to develop a plugin. :-)

    One question: you said "given where youve installed WP" - would throwing it somewhere else (into root?) make a difference?

    Thanks!

  7. moshu
    Member
    Posted 7 years ago #

    Yes. If it is in the root, Pages would be at:
    example.com/about

  8. rena17
    Member
    Posted 7 years ago #

    Well. I *was* missing something obvious.

    I'll just be moseying on into the install around midnight and moving it to root, then. After a look around to see if there is any downside to a root install to consider.

    Thanks, since I can move the install, it's resolved for me.

Topic Closed

This topic has been closed to new replies.

About this Topic