Change Permalink

I am trying to change the permalink whereby the "portfolio-item" part is removed. At the moment it looks like this:

 www.mywebsite.com/portfolio-item/post  -  however I want it to look like  -  www.mywebsite.com/post 

I have tried implementing a "false front" into the meta-portfolio.php but it doesn't seem to be working.
The code I have currently used is:

$args = array(
    'labels'                 => $labels,
    'menu_icon'                => 'dashicons-portfolio',
    'public'                 => true,
    'publicly_queryable'     => true,
    'show_ui'                 => true, 
    'query_var'             => true,
    'capability_type'         => 'post',
    'hierarchical'             => false,
    'menu_position'         => null,
    'rewrite'                 => array( 
        'slug'             => $slug, 
        'with_front'    => false,
    ),
    'supports'                 => array( 'author', 'comments', 'editor', 'excerpt', 'page-attributes', 'thumbnail', 'title' ),
);


Any suggestions and help will be much appreciated







Comments

Sign In or Register to comment.