This topic has 2 replies, 2 voices, and was last updated 3 years, 10 months ago ago by Olga Barlow
Hello,
my client need to get rid of “brand” slug – for example from hanak-brno.cz/brand/longines to hanak-brno.cz/longines but I dont see brand slug in pemalinks settings: https://prnt.sc/z7pu4m
Can you please guide me?
Thanks a lot
Olaf
Hello,
You can’t remove it at all. You can just change it. For example add code below in functions.php of the woopress-child theme and and edit the slug there – https://prnt.sc/oypieh :
function et_create_brand_taxonomies() {
$labels = array(
'name' => _x( 'Brands', 'woopress-core' ),
'singular_name' => _x( 'Brand', 'woopress-core' ),
'search_items' => esc_html__( 'Search Brands', 'woopress-core' ),
'all_items' => esc_html__( 'All Brands', 'woopress-core' ),
'parent_item' => esc_html__( 'Parent Brand', 'woopress-core' ),
'parent_item_colon' => esc_html__( 'Parent Brand:', 'woopress-core' ),
'edit_item' => esc_html__( 'Edit Brand', 'woopress-core' ),
'update_item' => esc_html__( 'Update Brand', 'woopress-core' ),
'add_new_item' => esc_html__( 'Add New Brand', 'woopress-core' ),
'new_item_name' => esc_html__( 'New Brand Name', 'woopress-core' ),
'menu_name' => esc_html__( 'Brands', 'woopress-core' ),
);
$args = array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'capabilities' => array(
'manage_terms' => 'manage_product_terms',
'edit_terms' => 'edit_product_terms',
'delete_terms' => 'delete_product_terms',
'assign_terms' => 'assign_product_terms',
),
'rewrite' => array( 'slug' => 'brand' ),
);
register_taxonomy( 'brand', array( 'product' ), $args );
}
Regards
You must be logged in to reply to this topic.Log in/Sign up