• what if we were able to define a different page name for each catagory? such as, i have a main page with my personal log, but then i have several other pages with content that would be easlily updated in wordpress, but cannot display properly because only one file (in my case main.php) can be defined. but if i were able to say that i only wanted the personal log file to be associated with the main.php, and then the profiles catagory to be associated with the profiles.php that’d make it much easier. i dont know if this is in the works, or there’s a better way to do it, but that would work for me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can do this now with mod rewrite and the %category% permalink variable.

    I should explain. Set your permalinks in the options to %category%/%postname%/
    Then take the .htaccess code that is generated and paste it into your .htaccess file. underneath what you just pasted… paste the same code again and replace index.php (or whatever) to whatever page you want…
    Also, at the beginning of each line, replace everything upto the first slash (/) with the category that you want… so the original .htaccess would be (i’ll give an example of just one line)
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index.php?year=$1&monthnum=$2&day=$3 [QSA]
    if you want the category profiles to be redirected to profiles.php, the htaccess line would be
    RewriteRule ^profiles/([0-9]{1,2})/([0-9]{1,2})/?$ /profiles.php?year=$1&monthnum=$2&day=$3 [QSA]
    I’ve done this exact thing on a client site (www.bioapplications.gr). Although you can’t tell because it hasn’t been updated yet, but if you click on the sidebar link (the one that says news test, it takes you to news.php, and not index.php.
    This is a very simple way to do it. Another way would be to install WP again in another directory for each category you want, or just wait for the multiple blog feature to be released (possibly in the next version).
    I hope this helps!

    Thread Starter danwray

    (@danwray)

    ok, i’m not familiar with the permalinks option, i’ve just never tried it yet… if i do enable this, will it actually change anything on the site as it exists at the moment, or will it just allow me to modify it in the way you say? does the permalinks option make a new file for every post, or is it just a different way of accessing the database? i just want to make sure that if i try this and either cant figure it out, or dont like it, i can go back to the way things were with minimal effort/damage. thanks for the help by the way.

    Changing the Permalink Options will not change anything. Like you said, it’s only a different way of getting hte data from the database.
    For every category that you want a seperate page for tho, you’ll have to create a seperate page for it. And then you can apply a single category plugin to the page to get only the posts you want from the specific category.
    So that your links point to the category pages, you need to modify the mod_rewrite code that is generated by WordPress. I explained how to do it above. If you are still confused however, let me know and I’ll try to clarify.
    One thing to note however is that ALL your links will change, so that if someone linked to your site using the old permalink options, then all links will be broken if you change the permalinks.
    Hope things work out!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘seperate page per catagory’ is closed to new replies.