Pouzivam Yoast SEO Breadcrumbs a mam nasledujici strukturu:
-local-volunteer-groups (page)
|
- Salobreña (CPT post)
|
- Castel de Ferro (CPT post)
|
- Almuñecar (CPT post)
Problem: Kdyz jsem na strance zobrazujici CPT post (napr. Salobreña), pak se mi breadcrumbs zobrazuji jako
Home > Salobreña
ale ja chci, by byly
Home > Local Volunteer Groups > Salobreña
Muj CPT registration is:
// Register Custom Post Type
function register_local_support_cpt() {
$labels = array(
'name' => _x( 'Local Volunteer Groups', 'Post Type General Name', 'acompalia' ),
'singular_name' => _x( 'Local Volunteer Group', 'Post Type Singular Name', 'acompalia' ),
'menu_name' => __( 'Local Volunteer Groups', 'acompalia' ),
'name_admin_bar' => __( 'Local Volunteer Groups', 'acompalia' ),
'archives' => __( 'Local Volunteer Group archives', 'acompalia' ),
'parent_item_colon' => __( 'Parent Item:', 'acompalia' ),
'all_items' => __( 'All Local Groups', 'acompalia' ),
'add_new_item' => __( 'Add New Group', 'acompalia' ),
'add_new' => __( 'Add New', 'acompalia' ),
'new_item' => __( 'New Group', 'acompalia' ),
'edit_item' => __( 'Edit Group', 'acompalia' ),
'update_item' => __( 'Update Group', 'acompalia' ),
'view_item' => __( 'View Group', 'acompalia' ),
'search_items' => __( 'Search Item', 'acompalia' ),
'not_found' => __( 'Not found', 'acompalia' ),
'not_found_in_trash' => __( 'Not found in Trash', 'acompalia' ),
'featured_image' => __( 'Featured Image', 'acompalia' ),
'set_featured_image' => __( 'Set featured image', 'acompalia' ),
'remove_featured_image' => __( 'Remove featured image', 'acompalia' ),
'use_featured_image' => __( 'Use as featured image', 'acompalia' ),
'insert_into_item' => __( 'Insert into item', 'acompalia' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'acompalia' ),
'items_list' => __( 'Items list', 'acompalia' ),
'items_list_navigation' => __( 'Items list navigation', 'acompalia' ),
'filter_items_list' => __( 'Filter items list', 'acompalia' ),
);
$rewrite = array(
'slug' => 'local-volunteer-groups',
'with_front' => false,
'pages' => false,
'feeds' => false,
);
$args = array(
'label' => __( 'Local support groups', 'acompalia' ),
'description' => __( 'Local support groups', 'acompalia' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'comments' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-groups',
'show_in_admin_bar' => false,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'query_var' => 'local_suport_group',
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'local_suport_group', $args );
}
add_action( 'init', 'register_local_support_cpt', 0 );