permalink, how to separate posts from pages. (7 posts)

  1. nearlythere
    Posted 11 years ago #

    i would like all posts to appear in site.com/portfolio/
    and pages to appear where-ever. so i can't put the entire wordpress in a /portfolio/ directory...

    I want:

    I tried a few things in Edit Permalink Structure

    Case 1:
    Structure: /%post_id%/
    Category base: /portfolio/

    ... This leaves individual entries to 'appear' outside , as in:
    site.com/post_id --> BUT... i need site.com/portfolio/post_id

    Case 2:
    Structure: /portfolio/%post_id%/
    Category base: (blank)

    site.com/portfolio/post_id is OK but this nests like this: site.com/portfolio/category/categoryname --> but I want to remove the word 'category'

    Case 3:
    conversly, i've tried to add portfolio in both places,
    Structure: /portfolio/%post_id%/
    Category base: /portfolio/

    This gives:

    site.com/portfolio/post_id -- > OK
    site.com/portfolio/portfolio/categoryname --> nests the word 'portfolio'
    site.com/portfolio/post_id is OK but this nests like this: site.com/portfolio/portfolio/category

    Case 4:
    I've tried hacking the classes.php file to have the word 'portfolio/ instead of category/ but this does not work for individual entries...

    Any ideas on how to skin this cat?

  2. lawtai
    Posted 11 years ago #

    Since you want all your posts in a subdirectory, why not go into your options and change the wordpress URL and blog URL. Have wordpress URL be site.com while the blog URL be site.com/portfolio. Then you just structrure your permalinks like you would normally without the extra portfolio in the structure.

  3. nearlythere
    Posted 11 years ago #

    i guess i shoulda made it clear-er at the start:

    since i'm using Pages too... and i would like pages to appear outside of 'portfolio' ... i can't put the entire wordpress in a /portfolio/ directory...

    but ouch. i just tried it anyway (and updated my permalink structure accordingly) and no links worked at all. ... and the Pages were placed in the portfolio dir.

  4. lawtai
    Posted 11 years ago #

    you can actually leave your wordpress installation in your root directory. all you need to do is just change the links that it refers to.

    So by having wordpress url be: site.com,
    and blog url be: site.com/portfolio,

    your pages and such I believe will show up without the portfoliio in the link, while your blog will.

  5. nearlythere
    Posted 11 years ago #

    yeah. as above, i tried that- using the settings as above, and nothing would show up at all, which was surprising.

    i updated my permalink structure too. still no joy. pages showing up- but not the blog under "portfolio". i was only getting server 404 errors. entering a longer path- which should show up, with portfolio/subpage/ etc. and i got a 500 server error.

    so, looking in error log files, i got this:

    [Fri Mar 25 11:18:40 2005] [error]
    mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.

    What is wrong with the .htaccess file??

  6. nearlythere
    Posted 11 years ago #

    i should add that i tried a variety of things;
    - deleting the .htaccess. and making it not editable by wordpress
    - copying it into .htaccess
    - removing all permalink settings.

    no joy, no joy.

  7. awsamuel
    Posted 11 years ago #

    I'm making a similar effort to use WordPress as a CMS and likewise running into problems putting blog posts and pages in separate directories. I want pages to appear in /root and posts to appear in /root/blog.

    When I install WordPress itself in /root and set options so that the WordPress URI is /root and the blog URI is /root/blog, the blog works fine, but any new pages I create have the URL /root/blog/pagetitle which is what I was trying to avoid when I moved my WP install out of the blog directory and into root.

    I could just give up on the soon-to-be-ridiculous artifact of having my blog at /root/blog and just put the posts in the root directory too, but then that involves a whole drama with my permalinks and since I'd rather have my blog in a /blog subdirectory I'd much rather figure a way of creating pages in the WordPress directory rather than the blog directory.

    Any advice much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.