• Good mornig!
    i’ve got a site with polylang plugin for the translation, and my problem is with the url.
    I have this two urls:
    -en/portfolio-view/example1231/
    -portfolio-view/example1232/

    and i want
    -en/our-company/references/example1231
    -nuestra-compania/referencias/example1232

    There are different portfolios with different urls, but when i try to modify the url in the slug configuration it change for the both.

    i’ve got this code on my theme-init:

    function my_post_type_portfolio() {
    	register_post_type( 'portfolio',
    					array(
    					'label' => __("Solutions", CURRENT_THEME),
    					'singular_label' => __("Solution Item", CURRENT_THEME),
    					'_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' => theme_locals("categories"), 'singular_name' => theme_locals("category"), "rewrite" => true, "query_var" => true));
    	register_taxonomy('portfolio_tag', 'portfolio', array('hierarchical' => false, 'label' => theme_locals("tags"), 'singular_name' => theme_locals("tag"), 'rewrite' => true, 'query_var' => true));
    }

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Modifyng the slug’ is closed to new replies.