Reply 274488 to: avoid "brand" slug

Avatar: Olga Barlow
Olga Barlow
Support staff
February 16, 2021 at 09:20

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

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.