if (!function_exists('create_portfolio_post_types')) : function create_portfolio_post_types() { register_post_type( 'portfolio', array( 'labels' => array( 'name' => __( 'Portfolio', 'framework'), 'singular_name' => __( 'Portfolio Item', 'framework'), 'add_new' => __( 'Add New', 'framework' ), 'add_new_item' => __( 'Add New Portfolio Item', 'framework'), 'edit' => __( 'Edit', 'framework' ), 'edit_item' => __( 'Edit Portfolio Item', 'framework'), 'new_item' => __( 'New Portfolio Item', 'framework'), 'view' => __( 'View Portfolio', 'framework'), 'view_item' => __( 'View Portfolio Item', 'framework'), 'search_items' => __( 'Search Portfolio Items', 'framework'), 'not_found' => __( 'No Portfolios found', 'framework'), 'not_found_in_trash' => __( 'No Portfolio Items found in Trash', 'framework'), 'parent' => __( 'Parent Portfolio', 'framework'), ), 'menu_icon' => 'dashicons-portfolio', 'public' => true, 'rewrite' => array( 'slug' => 'portfolio'), // Change this to change the url of your "portfolio". 'supports' => array( 'title', 'editor', 'comments', 'thumbnail', 'revisions', 'post-formats'), ) ); } add_action( 'init', 'create_portfolio_post_types' ); endif;