Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1546

    Hi,

    I read some posts about the permalinks and did the code change in the portfolio.php to get rid of the ‘category’ in the url.

    But now when I click on a portfolio item I get a 404 error.

    Tried to re-save the permalinks. But it will not work.

    Changing the permalinks to default resolves it.

    My costum structure for the permalinks is: /%postname%/

    The link to the site: http://sonartc.nl/wordpress/

    Hope you can help me out with this strange issue.

    #35611
    #35612

    Hi,

    And without any reason all the pages get 404 errors except the homepage.

    I have never experienced such a strange behaviour of a template from Kriesi.

    #35613

    I tested several settings.

    Only when I use the code ‘rewrite’ => array(‘slug’=>$slugRule.’/portfolio’,’with_front’=>true) and the default permalinks settings or the custom setting /%category%/%postname%/ everything works fine.

    When I change the permalink to /%postname%/ then the 404 problem occurs.

    #35614
    #35615

    Hi dude,

    Wel this seems to work no 404 errors!

    Thanks for your help.

    How can I remove portfolio out of the url.

    http://sonartc.nl/wordpress/portfolio/nlp-basiscursus-2010-harderwijk/

    Permalinks is now set to: /%postname%/

    #35616

    Open up /theme_options/portfolio.php and change this:

    $slugRule = get_option('category_base');
    if($slugRule == "") $slugRule = 'category';

    $args = array(
    'labels' => $labels,
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug'=>$slugRule.'/portfolio','with_front'=>true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'menu_position' => 5,
    'supports' => array('title','thumbnail','excerpt','editor','comments')
    );

    to this:

    //$slugRule = get_option('category_base');
    //if($slugRule == "") $slugRule = 'category';
    $slugRule ="";

    $args = array(
    'labels' => $labels,
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug'=>$slugRule.'','with_front'=>true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'menu_position' => 5,
    'supports' => array('title','thumbnail','excerpt','editor','comments')
    );

    And reset your permalinks by saving them again.

    #35617

    Hi,

    Sorry it does not work … the 404 errors are back again on all pages except the homepage!

    #35618

    I’ve tested it on my test server without problems. Maybe the permalink reset didn’t work. Please try it again. I don’t know another way to achieve what you want because you need to rewrite the slug.

    #35619

    Hi I’m having the same issue. I changed the php file using the new code, added the WP “no category” plug in (although I know it has no impact), flushed the permalink, rewrite page, emptied my cache, tried on different browsers…still getting 404 error. URGENT, please help.

    http://www.picturiapress.com.

    When I change the permalinks back to default, all the pages get page_id’s, but the portfolio get’s the actual page name

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

The topic ‘404 errors portfolio’ is closed to new replies.