• dominicsutherland

    (@dominicsutherland)


    I am using the Valerie WordPress theme from Themeforest.

    The code below is how it sets the URL for portfolio items:

    register_post_type( 'project_post',
    			array(
    				'labels' => array(
    					'name' => __( "Projects","um_lang"),
    					'singular_name' => __( "Project" ,"um_lang")
    				),
    				'public' => true,
    				'has_archive' => true,
    				'rewrite' => array('slug' => "project_item", 'with_front' => TRUE),
    				'supports' => array('title','editor','thumbnail','page-attributes')
    			)
    		);

    I need, instead of “project_item”, for it to get the category for which the portfolio post is in. The current URL reads http://”siteurl”.com/project_item/”project_name”. How can I do this?

The topic ‘Change the post URL’ is closed to new replies.