WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type UI
[resolved] Custom Rewrite Slug Issue (1 post)

  1. Travis Smith
    Member
    Posted 3 years ago #

    The Custom Post Types UI Plugin (http://wordpress.org/extend/pl…..t-type-ui/) causes a problem with multiple custom taxonomies (and I believe the same is true for custom post types) if one does not set the Custom Rewrite Slug. Currently, if one does not attempt the Advanced Options for Custom Taxonomies, the code produced is something like:

    [php]register_taxonomy('actors',array (
    0 => 'people',
    ),array( 'hierarchical' => false, 'label' => 'Actors','show_ui' => true,'query_var' => true,'rewrite' => array('slug' => ''),'singular_label' => 'Actor') );[/php]

    To fix the error, if it defaulted to something like the following (writing the slug as the taxonomy name with rewrite set to true), I believe the error would no longer exist:

    [php]register_taxonomy('actors',array (

    0 => 'people',

    ),array( 'hierarchical' => false, 'label' => 'Actors','show_ui'
    => true,'query_var' => true,'rewrite' => array('slug' =>
    'actors'),'singular_label' => 'Actor') );[/php]]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic