Custom post type permalink not working (404)
-
I have the following code
$itemlabels = array( 'name' => _x('Items', 'post type general name', WPDEV_THEME_TEXTDOMAIN), 'singular_name' => _x('Item', 'post type singular name', WPDEV_THEME_TEXTDOMAIN), 'add_new' => _x('Add Item', 'classsified', WPDEV_THEME_TEXTDOMAIN), 'add_new_item' => __('Add New Item ', WPDEV_THEME_TEXTDOMAIN), 'edit_item' => __('Edit Item', WPDEV_THEME_TEXTDOMAIN), 'new_item' => __('New Item', WPDEV_THEME_TEXTDOMAIN), 'view_item' => __('Visit item page', WPDEV_THEME_TEXTDOMAIN), 'search_items' => __('Search Item', WPDEV_THEME_TEXTDOMAIN), 'not_found' => __('No items found', WPDEV_THEME_TEXTDOMAIN), 'not_found_in_trash' => __('No items in trash', WPDEV_THEME_TEXTDOMAIN), 'parent_item_colon' => '', 'menu_name' => __('Marketplace', WPDEV_THEME_TEXTDOMAIN) ); $itemargs = array( 'labels' => $itemlabels, 'taxonomies' => array('category'), 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'menu_icon' => (get_bloginfo('template_url') . '/images/market-icon.png'), 'show_in_menu' => true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'rewrite' => array('slug' => 'product'), 'menu_position' => 7, 'supports' => array('title', 'author', 'editor', 'custom-fields', 'thumbnail') );
Registers the post type, assigns the taxonomy – but the permalink (e.g.
https://example.com/product/new-item-2/
) ALWAYS goes to 404 page!It is a WP bug – or it’s only me?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom post type permalink not working (404)’ is closed to new replies.