WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type Permalinks
%taxonomy% not working in rewrite (3 posts)

  1. futurepocket
    Member
    Posted 2 years ago #

    Tried the plugin hoping it would work. I have a custom post type "REVIEWS" and custom taxonomy "TYPES" attached to the "REVIEWS" custom post type. I made "PRODUCTS" under the "TYPES" hoping to get a permalink structure like:

    /reviews/products/%postname%

    I set the custom permalink structure to:

    /reviews/%types%/%postname%

    But it just shows %types% in the permalink, doesn't actually get "products". Any fix to this?

    http://wordpress.org/extend/plugins/custom-post-type-permalinks/

  2. BriceLucas
    Member
    Posted 1 year ago #

    Hi Futurepocket, can you post your post-type.php code here?

  3. skthewebmaster
    Member
    Posted 1 year ago #

    I have also same problem. I have created custom post type "listing" and custom taxonomy "state". I want to display state in the listing url. So I have found this plugin and hope it can help me but it gives page not found error.

    Here is the code for register my listing post type.

    register_post_type(POST_TYPE, array('label' => CUSTOM_MENU_TITLE,
    'labels' => array('name' => CUSTOM_MENU_NAME,
    'singular_name' => CUSTOM_MENU_SIGULAR_NAME,
    'add_new' => CUSTOM_MENU_ADD_NEW,
    'add_new_item' => CUSTOM_MENU_ADD_NEW_ITEM,
    'edit' => CUSTOM_MENU_EDIT,
    'edit_item' => CUSTOM_MENU_EDIT_ITEM,
    'new_item' => CUSTOM_MENU_NEW,
    'view_item' => CUSTOM_MENU_VIEW,
    'search_items' => CUSTOM_MENU_SEARCH,
    'not_found' => CUSTOM_MENU_NOT_FOUND,
    'not_found_in_trash' => CUSTOM_MENU_NOT_FOUND_TRASH),
    'public' => true,
    'can_export' => true,
    'has_archive' => TRUE,
    'show_ui' => true, // UI in admin panel
    '_builtin' => false, // It's a custom post type, not built in
    '_edit_link' => 'post.php?post=%d',
    'capability_type' => 'post',
    'menu_icon' => get_template_directory_uri() . '/images/icon.png',
    'hierarchical' => false,
    'rewrite' => array("slug" => POST_TYPE), // Permalinks
    'has_archive' => true,
    'menu_position' => 3,
    'query_var' => POST_TYPE, // This goes to the WP_Query schema
    'supports' => array('title',
    'author',
    // 'excerpt',
    'thumbnail',
    'comments',
    'editor',
    //'trackbacks',
    //'custom-fields',
    'revisions'),
    'show_in_nav_menus' => true,
    'taxonomies' => array(CUSTOM_CAT_TYPE, CUSTOM_TAG_TYPE)
    )
    );

    please give me reply asap. I will definately give you full rating if this will work.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic