Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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

    http://www.domainname.com/category/portfolio/postname/

    it is just

    http://www.domainname.com/postname/

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

    #32799

    Hey,

    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

    Cheers,

    James

    #32800

    Hi James,

    awesome, thanks!

    #32801

    Hi James,

    is there anything else that needs to be done? I did as you instructed, but its still http://www.domainname.com/category/portfolio/postname/

    When I try http://www.domainname.com/postname/ I get a 404.

    Thanks

    #32802

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

    #32803

    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 :-(

    #32804

    Hey,

    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. :)

    James

    #32805

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

    http://xnnetwork.com/dinersclub

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

    #32806

    Hey,

    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.

    James

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

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