• Resolved cglaudel

    (@cglaudel)


    Hello all. 2 questions :
    Is this code filter useful and compliant with the plugin to make the brands sortable:

    add_filter( 'woocommerce_sortable_taxonomies','custom_sort_brands' );
    function custom_sort_brands( $sortable ) {
    	$sortable[] = 'product_brand';
    	return $sortable;
    }

    and is the code to change the slug to what I need is useless? :

    function customise_product_brand_slug ( $tax ) {
    	$tax['rewrite']['slug'] = 'artists'; // Replace 'artists' with your desired brand slug.
    	return $tax;
    }
    add_filter( 'register_taxonomy_product_brand', 'customise_product_brand_slug' );

    Thanks

  • The topic ‘Sort Brands’ is closed to new replies.