Change order of taxonomies in url
-
hello,
my CPT taxonomies is ordered as below :
Categories
Tags
Artists
Typesand i’m using this code from your FAQ:
function moveElement( &$array, $a, $b ) { $p1 = array_splice($array, $a, 1); $p2 = array_splice($array, 0, $b); $array = array_merge($p2,$p1,$array); } function custom_tax_ordering( $taxonomies, $current_post_type ) { moveElement( $taxonomies, 3, 0 ); return $taxonomies; } add_filter( 'beautiful_filters_taxonomy_order', 'custom_tax_ordering' );
so i can move “Types” (3rd in ordering) to 1st on taxonomy ordering.
but i get this error after inserting that code to my function.php
Fatal error: Uncaught ArgumentCountError: Too few arguments to function custom_tax_ordering(),
what am i doing wrong ?
i appreciate it if you can help me change my taxonomies orders as below :
1. Types
2. Category
3. Artist
4. Tags
- The topic ‘Change order of taxonomies in url’ is closed to new replies.