Changing the name of a post-type in cherry framework 4.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | function wpd_update_taxonomy_args( $taxonomy, $object_type, $args ){ if( 'portfolio_category' == $taxonomy ){ // remove this action so we don't create an infinite loop! remove_action( current_action(), __FUNCTION__ ); // change arguments $args['rewrite'] = array( 'slug' => 'product_categories' ); // re-register register_taxonomy( $taxonomy, $object_type, $args ); } } add_action( 'registered_taxonomy', 'wpd_update_taxonomy_args', 10, 3 ); add_filter( 'cherry_portfolio_post_type_args', 'monstroid_filter_team_params' ); function monstroid_filter_team_params( $args ) { $args['rewrite']['slug'] = 'products'; return $args; }flush_rewrite_rules(); |
Then install Custom Post Type Editor plugin to change it in the GUI