So I feel like I am doing something obviously simple, yet can't figure out what! I created my custom post type = Author and then created single-Author.php to display the information of each author but when I open link of each author 404.php
here is custom post type author
function p2p2_register_author(){
$labels = array(
'name' => _x( 'همکاران', 'Author' ),
'singular_name' => _x('همکار','Author'),
'add_new' => _x( 'افزودن همکار', '' ),
'add_new_item' => __( 'افزودن همکاران جدید' ),
'edit_item' => __( 'ویرایش همکار' ),
'new_item' => __( 'همکار جدید' ),
'all_items' => __( 'همه همکاران' ),
'search_items' => __( 'جست و جو همکار' ),
'not_found' => __( 'همکاری یافت نشد' ),
'not_found_in_trash' => __( 'همکار در زباله دان یافت نشد' ),
'parent_item_colon' => '',
'menu_name' => 'همکار'
);
register_post_type(
'Author',
array (
'labels' => $labels,
'description' => 'ذخیره اطلاعات مربوط به همکاران',
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'author' ),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
)
);
}
add_action('init', 'p2p2_register_author');
flush_rewrite_rules();
I also have archive-author and it works really fine but single-Author.php doesn't work.
Any help would be much appreciated!