Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #764

    I guess this is tough, but maybe there is an easy solution.

    All portfolio items are in the subdirectory /category/portfolio/ – is it possible to remove those two directories?

    So instead of

    it is just

    This works for normal pages just fine, I’d like that for portfolio items too.



    Open up /theme_options/portfolio.php and find this code:

    'rewrite' => array('slug'=>$slugRule.'/portfolio','with_front'=>true),

    Replace it with:

    'rewrite' => array('slug'=>'','with_front'=>false),

    to remove the /category/portfolio section of your URL’s




    Hi James,

    awesome, thanks!


    Hi James,

    is there anything else that needs to be done? I did as you instructed, but its still

    When I try I get a 404.



    just noticed this: now, when I add a new portfolio item, it does indeed make it in the editor. but when I click on the “View Portfolio Item” button, it goes to where there is again just a 404.


    then I replaced ‘rewrite’ => array(‘slug’=>”,’with_front’=>false), with ‘rewrite’ => array(‘slug’=>$slugRule.’/portfolio’,’with_front’=>true), to go back to the old version for now and now nothing is working. every page, post, category, portfolio item all is 404 – only the homepage works :-(



    In WP admin, go to your Permalinks Settings page and hit save. This will flush the rewrite rules and should get all the pages working again.

    If you adjust the “rewrite” for Portfolio links or any other Custom Post Types, you need to save your Permalink settings again. :)



    Help! :O I just did this, AND your final step James, but it does not work anyway! 404 error everywhere besides homepage!

    Thaught this was a small thing to do, but now my homepage is down and its NOT good.. Need help asap please! :O



    It seems to be working ok at the moment, if you get problems with 404 errors (page not found) after changing the permalink structure you need to flush the rewrite rules.

    Go to WP admin > Settings > Permalinks, simply opening this page flushes the rules so there’s no need to make any changes or save and data.


Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘URL structure – possible to change for portfolio items?’ is closed to new replies.