Answer the question
In order to leave comments, you need to log in
Why is wordpress ignoring the page.php file?
Hello, I've never experienced this before.
Wordpress simply refuses to see the page.php file
But if you change permalink to type ?p=123 in the permalink settings,
it
immediately sees page.php If I switch back, then the page loads the template from index.php along the new path
Answer the question
In order to leave comments, you need to log in
I found where the problem is, but I can’t understand why, everything seems to be correct
. I delete this code and everything is OK
// Register Custom Taxonomy
function year_taxonomy() {
$labels = array(
'name' => _x( 'Года', 'Taxonomy General Name', 'text_domain' ),
'singular_name' => _x( 'Год', 'Taxonomy Singular Name', 'text_domain' ),
'menu_name' => __( 'Года', 'text_domain' ),
'all_items' => __( 'Все года', 'text_domain' ),
'parent_item' => __( 'Parent Item', 'text_domain' ),
'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),
'new_item_name' => __( 'Новое имя года', 'text_domain' ),
'add_new_item' => __( 'Добавить новый год', 'text_domain' ),
'edit_item' => __( 'Изменить год', 'text_domain' ),
'update_item' => __( 'Обновить год', 'text_domain' ),
'view_item' => __( 'Посмотреть год', 'text_domain' ),
'separate_items_with_commas' => __( 'Разделить годы запятой', 'text_domain' ),
'add_or_remove_items' => __( 'Добавить или удалить год', 'text_domain' ),
'choose_from_most_used' => __( 'Выбрать из популярных', 'text_domain' ),
'popular_items' => __( 'Популярные года', 'text_domain' ),
'search_items' => __( 'Поиск годов', 'text_domain' ),
'not_found' => __( 'Not Found', 'text_domain' ),
'no_terms' => __( 'No items', 'text_domain' ),
'items_list' => __( 'Список годов', 'text_domain' ),
'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
);
register_taxonomy( 'year', array( 'movie' ), $args );
}
add_action( 'init', 'year_taxonomy', 5 );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question