Removing 'portfolio-view' from url - almost what is missing from code? (2 posts)

  1. damfino52
    Posted 3 years ago #

    I am trying to remove portfolio view from url and followed instructions to remove its name from highlighted section. This works but has left me with 'portfolio' now even though field is blank. what is wrong with this code or need changing in breadcrumbs please?
    trying to get:
    currently have: http//www.sitename.com/portfolio/post

    /* Portfolio */
    function my_post_type_portfolio() {
    	register_post_type( 'portfolio',
    				'label' => __('Portfolio'),
    				'singular_label' => __('Porfolio Item', 'theme'),
    				'_builtin' => false,
    				'public' => true,
    				'show_ui' => true,
    				'show_in_nav_menus' => true,
    				'capability_type' => 'page',
    				'menu_icon' => get_template_directory_uri() . '/includes/images/icon_portfolio.png',
    				<strong>'rewrite' => array(
    					'slug' => '',
    					'with_front' =>false,</strong>
    				'supports' => array(
    	register_taxonomy('portfoliocat', 'portfolio', array('hierarchical' => true, 'label' => 'Portfolio Categories', 'singular_name' => 'Category', "rewrite" => true, "query_var" => true));
    add_action('init', 'my_post_type_portfolio');

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser.]

  2. damfino52
    Posted 3 years ago #

    Now fixed

Topic Closed

This topic has been closed to new replies.

About this Topic