I have custom post type venue
and custom taxonomy 'facility' and 'types',
is it possible to generate custom permalinks for the single post and archive with current posts taxonomy slug.
Example:
single post term facility
slug is 'restaurant'
http://mywebsite.com/restaurant/restaurant-name
archive page
http://mywebsite.com/restaurants
My custom post declaration
$args = array(
'label' => __( 'Venue', 'weera' ),
'description' => __( 'Dubai day Venue listings', 'weera' ),
'labels' => $labels,
'supports' => array( 'title', 'excerpt', 'author', 'thumbnail', 'revisions'),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-palmtree',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
'rewrite' => array( 'slug' => 'restaurant'),
'has_archive' => true,
);
register_post_type( 'venue', $args );
My taxonomy 'facility' declaration
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'rewrite' => array( 'slug' => 'venue' ),
);
register_taxonomy( 'facility', array( 'venue' ), $args );
but http://mywebsite.com/restaurants and http://mywebsite.com/restaurant/restaurant-name both gives 404 pages.