custom post types permalinks
-
Hi, I am trying to workout what i am doing wrong with the permalinks structure. I have created this page:
http://adamknight.com.au/AboriginalArtSpecialistAustralia/artists/
When I go to this page: http://adamknight.com.au/AboriginalArtSpecialistAustralia/artist/barbara-reid/ and select the
‘Artists’ link in the breadcrumbs the pages goes to this page http://adamknight.com.au/AboriginalArtSpecialistAustralia/artistSo I have 2 pages:
1.http://adamknight.com.au/AboriginalArtSpecialistAustralia/artist
2.http://adamknight.com.au/AboriginalArtSpecialistAustralia/artistsI like the http://adamknight.com.au/AboriginalArtSpecialistAustralia/artists as i have styled it
How do i fix permalinks in url and breadcrumb.
I have tried to change
'rewrite' => array( 'slug' => 'artist' ),to
'rewrite' => array( 'slug' => 'artists' ),but get error?
thanks Mike
function codex_custom_init() { $labels = array( 'name' => 'Artists', 'singular_name' => 'Artist', 'add_new' => 'Add New', 'add_new_item' => 'Add New Artist', 'edit_item' => 'Edit Artist', 'new_item' => 'New Artist', 'all_items' => 'All Artists', 'view_item' => 'View Artist', 'search_items' => 'Search Artists', 'not_found' => 'No artists found', 'not_found_in_trash' => 'No artists found in Trash', 'parent_item_colon' => '', 'menu_name' => 'Artists' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'artist' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'menu_icon' => 'dashicons-art', 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ) ); register_post_type( 'artist', $args ); flush_rewrite_rules();
The topic ‘custom post types permalinks’ is closed to new replies.