Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Sabiaskey,

    try something like this;

    $categoriesT = sortCategories(get_categories( $args ));
    function sortCategories($items){
    $placeHolder= [];
    foreach($items as $item){
    $placeHolder[$item->name] = $item;
    }
    ksort($placeHolder);
    return $placeHolder;
    }

    Hope it helps you
    Kabita

    Plugin Author nsp-code

    (@nsp-code)

    Try to un-check the Autosort setting. Also make sure you include a ‘orderby’ argument for the get_terms()

    Thread Starter sabalaskey

    (@sabalaskey)

    The point is that the normal plugin behavior breaks WordPress for the display of any taxonomy. The new/edit post page also has it’s categories out of order because of this plugin, and I certainly won’t hack the core to get around this plugin. Setting orderby in other plugin code does not work either. I have deleted this plugin as its side effects are fatal.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘This plugin breaks sorting using get_terms()’ is closed to new replies.