• Resolved Róbert Mészáros

    (@meszarosrob)


    add_action( 'init', 'cptui_register_my_taxes' );
    function cptui_register_my_taxes() {
    
    	$labels = array(
    		"name" => "step_by_step_tags",
    		"label" => "Step by Step Tags",
    			);
    
    	$args = array(
    		"labels" => $labels,
    		"hierarchical" => false,
    		"label" => "Step by Step Tags",
    		"show_ui" => true,
    		"query_var" => true,
    		"rewrite" => array( 'slug' => 'step_by_step_tags', 'with_front' => false ),
    		"show_admin_column" => false,
    	);
    	register_taxonomy( "step_by_step_tags", array( "step_by_step" ), $args );
    
    	$labels = array(
    		"name" => "step_by_step_categs",
    		"label" => "Step by Step Categories",
    			);
    
    	$args = array(
    		"labels" => $labels,
    		"hierarchical" => true,
    		"label" => "Step by Step Categories",
    		"show_ui" => true,
    		"query_var" => true,
    		"rewrite" => array( 'slug' => 'step_by_step_categs', 'with_front' => false ),
    		"show_admin_column" => false,
    	);
    	register_taxonomy( "step_by_step_categs", array( "step_by_step" ), $args );
    
    	$labels = array(
    		"name" => "step_by_step_levels",
    		"label" => "Step by Step Levels",
    			);
    
    	$args = array(
    		"labels" => $labels,
    		"hierarchical" => true,
    		"label" => "Step by Step Levels",
    		"show_ui" => true,
    		"query_var" => true,
    		"rewrite" => array( 'slug' => 'step_by_step_levels', 'with_front' => false ),
    		"show_admin_column" => false,
    	);
    	register_taxonomy( "step_by_step_levels", array( "step_by_step" ), $args );
    
    	$labels = array(
    		"name" => "course_dates",
    		"label" => "Course Dates",
    			);
    
    	$args = array(
    		"labels" => $labels,
    		"hierarchical" => true,
    		"label" => "Course Dates",
    		"show_ui" => true,
    		"query_var" => true,
    		"rewrite" => array( 'slug' => 'course_dates', 'with_front' => false true),
    		"show_admin_column" => false,
    	);
    	register_taxonomy( "course_dates", array( "course" ), $args );
    
    	$labels = array(
    		"name" => "course_levels",
    		"label" => "Course Levels",
    			);
    
    	$args = array(
    		"labels" => $labels,
    		"hierarchical" => true,
    		"label" => "Course Levels",
    		"show_ui" => true,
    		"query_var" => true,
    		"rewrite" => array( 'slug' => 'course_levels', 'with_front' => false ),
    		"show_admin_column" => false,
    	);
    	register_taxonomy( "course_levels", array( "course" ), $args );
    
    // End cptui_register_my_taxes
    }

    This is the code generated by the plugin, the problem is with this line

    "rewrite" => array( 'slug' => 'course_dates', 'with_front' => false true),

    I have selected rewrite with front: false and rewrite hierarchival: true. I guess it shoudl be 'hierarchical' => true

    https://ww.wp.xz.cn/plugins/custom-post-type-ui/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Export error’ is closed to new replies.