Support » Fixing WordPress » Folder-based navigation

  • I appreciate your help with the following:
    I’m curious how Matt, Zeldman and others are accomplishing the folder-based navigation? On these sites, they have a nav bar which points to a folder, i.e.: /archives/. I know how to change the paths and create the folders, etc. I have even got some of this working. Example:
    I created folders for an “about” page, a “links” page, and an “archives” page. I modified the main index.php to include only what was needed for these particular pages. I copied these into their respective folders and named them each index.php. I modified the naivation to point to just the folder names. I also changed the path to wp-blog-headers.php to point outside the new folder strcuture; simply added a . to the front of the path.
    The “about” and “reading” pages worked just fine, but the “archives” page simply refreshed the main index.php of the site; did not display the archives.
    Perhaps my method is not even the best way to accomplish the folder-based navigation; it certainly didn’t work as I intended.
    Anyone have a suggestion for me? Perhaps this would also be of interest to others.
    TIA
    <rb>
    BTW: I switched my site back to the non-folder based nav.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The reason archives did not work is because /archives/ is taken over by the rewrite rules and wordpress. So creating a folder named archives will never get accessed because the rewrite rules will always call up index.php and pass it parameters (if there are any).

    If your content is not hardcoded…there will be another answer

    What would that be? I do want to do some WP database queries on a couple of the pages?
    Thanks!
    <rb>

    The reason archives did not work is because /archives/ is taken over by the rewrite rules and wordpress.

    Thanks, MtnDew. So, I should able to use a different name and all will be well. Will do a test now.
    <rb>

    I have an existing site (non-WP, but I’m migrating), with URI’s in the form
    http://www.mysite.org/geography/mountains/
    As a default with WP, even if I create sub-categories with just one post, the links will become:
    http://www.mysite.org/category/geography/mountains/
    However, adding this to the .htaccess file immediately after the RewriteBase line redirects them nicely:
    RewriteRule ^geography/?(.*) /wordpress/index.php?category_name=geography&$1 [QSA]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Folder-based navigation’ is closed to new replies.