Hello to all I’m dealing with a problem with WordPress
On saving my {custom} put up My permalink is up to date and the class is eliminated robotically from the url which trigger the 404 for the put up
right here is my {custom} postcode
/** Information Customized Submit **/
add_action( 'init', 'tm_news_cpt' );
perform tm_news_cpt() {
$labels = array(
'title' => _x( 'Information', 'text_domain' ),
'singular_name' => _x( 'Information', 'text_domain' ),
'add_new' => _x( 'Add New', 'text_domain' ),
'add_new_item' => _x( 'Add New Information', 'text_domain' ),
'edit_item' => _x( 'Edit Information', 'text_domain' ),
'new_item' => _x( 'New Information', 'text_domain' ),
'view_item' => _x( 'View Information', 'text_domain' ),
'search_items' => _x( 'Search Information', 'text_domain' ),
'not_found' => _x( 'No Information discovered', 'text_domain' ),
'not_found_in_trash' => _x( 'No Information present in Trash', 'text_domain' ),
'parent_item_colon' => _x( 'Father or mother Information:', 'text_domain' ),
'menu_name' => _x( 'Information', 'text_domain' ),
);
$args = array(
'label' => __( 'Information', 'text_domain' ),
'description' => __( 'Submit Sort Description', 'text_domain' ),
'labels' => $labels,
'helps' => array('title','textual content','editor','thumbnail','creator', 'page-attributes', 'custom-fields','feedback' ),
'hierarchical' => false,
'rewrite' => array('slug' => 'information/%news_cat%'),
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 6,
'menu_icon' => 'dashicons-admin-post',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
);
register_post_type( 'information', $args );
}
perform tm_news_taxonomy() {
register_taxonomy(
'news_cat',
'information',
array(
'hierarchical' => true,
'show_admin_column'=>true,
'label' => 'Classes',
'query_var' => true,
'rewrite' => array(
'slug' => 'news_cat',
'with_front' => false
)
)
);
}
add_action( 'init', 'tm_news_taxonomy');
on save, the put up is simply updating a meta worth.
That is the way it appears to be like earlier than replace
so earlier than the replace, my permalink is like information/vacation spot/title-of-post
The place the vacation spot is the class title
And After replace it appear to be this
As a result of this transformation in permalink web page goes to 404 on view in addition to on entrance finish