August 26, 2010 at 9:09 am #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.August 27, 2010 at 1:07 pm #32799
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
JamesAugust 27, 2010 at 4:25 pm #32800August 30, 2010 at 7:17 am #32801
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.
ThanksAugust 30, 2010 at 7:25 am #32802August 30, 2010 at 7:33 am #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 :-(September 1, 2010 at 12:32 pm #32804
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. :)
JamesSeptember 14, 2010 at 8:40 am #32805
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! :OSeptember 15, 2010 at 1:02 pm #32806
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.
The topic ‘URL structure – possible to change for portfolio items?’ is closed to new replies.