Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
What if instead of using such filters you change the rewrite parameter on the taxonomy directly, given that it is a custom one?
So something like:
function register_custom_taxonomy() {
$labels = array(
'name' => _x('Custom Categories', 'taxonomy general name'),
// ... other labels ...
);
$args = array(
'hierarchical' => true, // Set to true if you want taxonomy to be hierarchical like categories, set to false for tags-like behavior
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array('slug' => '/', 'with_front' => false), // This removes the base slug from URL
);
register_taxonomy('custom_category', array('post'), $args);
}
add_action('init', 'register_custom_taxonomy');
The topic ‘[Closed] Remove category slug from WP URLs when using WPML’ is closed to new replies.