WordPress.org

Ready to get started?Download WordPress

Forums

Edit Slug from custom category (1 post)

  1. ralfjuh
    Member
    Posted 1 year ago #

    Hi, some pages I go to on my website show http://www.mywebsite.com/portfolio-view/page1/ in the URL.

    How do I CHANGE "portfolio-view" from the url?
    In my functions.php file there's nothing I can find.

    However I checked my theme file theme-init.php and I found this:

    function my_post_type_portfolio() {
    	register_post_type( 'portfolio',
                    array(
    				'label' => __('Programs'),
    				'singular_label' => __('Programs Item', 'theme1373'),
    				'_builtin' => false,
    				'public' => true,
    				'show_ui' => true,
    				'show_in_nav_menus' => true,
    				'hierarchical' => true,
    				'capability_type' => 'page',
    				'menu_icon' => get_template_directory_uri() . '/includes/images/icon_portfolio.png',
    				'rewrite' => array(
    					'slug' => 'portfolio-view',
    					'with_front' => FALSE,
    				),
    				'supports' => array(
    						'title',
    						'editor',
    						'thumbnail',
    						'excerpt',
    						'custom-fields',
    						'comments')
    					)
    				);
    	register_taxonomy('portfolio_category', 'portfolio', array('hierarchical' => true, 'label' => 'Programs Categories', 'singular_name' => 'Category', "rewrite" => true, "query_var" => true));
    }
    
    add_action('init', 'my_post_type_portfolio');

    Ive tried changing it here and refreshing my permalinks file but nothing changes.. anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic