Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I wanted to change the slug of the portfolio of my page, it is actually /portfolio-item/ i went to my custom_post_types.php file and changed the rewrite rule of the slug to my needs, but when i flush my permalink structure all my portfolio items get their permalink changed to mysite.es/myslug//. Am i doing something wrong? Is anything else needed when changing the permalink structure?

// Register Custom Post Type: 'Portfolio'
function ss_framework_register_post_type_portfolio() {

    $labels = array(
        'name'               => __( 'Portfolio', 'ss_framework' ),
        'singular_name'      => __( 'Project', 'ss_framework' ),
        'add_new'            => __( 'Add New', 'ss_framework' ),
        'add_new_item'       => __( 'Add New Project', 'ss_framework' ),
        'edit_item'          => __( 'Edit Project', 'ss_framework' ),
        'new_item'           => __( 'New Project', 'ss_framework' ),
        'view_item'          => __( 'View Project', 'ss_framework' ),
        'search_items'       => __( 'Search Projects', 'ss_framework' ),
        'not_found'          => __( 'No projects found', 'ss_framework' ),
        'not_found_in_trash' => __( 'No projects found in Trash', 'ss_framework' ),
        'parent_item_colon'  => __( 'Parent Project:', 'ss_framework' ),
        'menu_name'          => __( 'Portfolio', 'ss_framework' ),
    );

    $args = array(
        'labels'              => $labels,
        'hierarchical'        => false,
        'supports'            => array( 'title', 'editor', 'thumbnail' ),
        'taxonomies'          => array( 'portfolio-categories' ),
        'public'              => true,
        'show_ui'             => true,
        'show_in_menu'        => true,
        'show_in_nav_menus'   => true,
        'publicly_queryable'  => true,
        'exclude_from_search' => true,
        'has_archive'         => true,
        'query_var'           => true,
        'can_export'          => true,
        'rewrite'             => array( 'slug' => 'portfolio-item' ),
        'capability_type'     => 'post',
        'menu_position'       => null,
        'menu_icon'           => SS_BASE_URL . 'functions/assets/img/icon-portfolio.png'
    );

    register_post_type( 'portfolio', apply_filters( 'ss_framework_register_post_type_portfolio', $args ) );

}add_action('init', 'ss_framework_register_post_type_portfolio');
share|improve this question
    
try pasting your custom_post_type.php code here to get some help –  chifliiiii Apr 4 '13 at 13:24
add comment

1 Answer

up vote 1 down vote accepted

I got rid of the error, it was the theme itself who blocked the portfolio form changing, edited some code from the theme solved it. The website is done in an old theme which is no longer supported :(

share|improve this answer
    
+1 for finding your own answer! –  Tom J Nowell Apr 8 '13 at 10:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.