J'ai quelques CPT Wordpress. Ils corrigent l'URL devrait être/wordpress/training/training-page /, et c'est l'URL que je vois dans la page de gestion d'admin, mais quand je clique sur le lien l'URL que je me retrouve est/wordpress/blog/2010/05/21/page d'entraînement /.Custom Post Type URL redirigé faux
J'ai désactivé mes plugins sans succès. Est-ce que quelqu'un sait comment garder l'URL correcte intacte?
Voici mon code:
<?php
add_action('init', 'tv_content_posttype');
function tv_content_posttype() {
register_taxonomy('content',
'training',
array(
'hierarchical' => true,
'label' => 'Content Index',
'query_var' => true,
'rewrite' => true
)
);
register_post_type('training',
array(
'type' => 'page',
'labels' => array(
'name' => __('TV Training'),
'singular_name' => __('TV Training')
),
'public' => true,
'rewrite' => array(
'with_front' => false,
'slug' => 'training',
),
'hierarchical' => true,
'query_var' => true,
'taxonomies' => array('content'),
)
);
}