• Hi,

    and thank you for your plugin. Two notes:

    1.
    “Optionally set ‘orderby’ => ‘term_order’, ‘order => ‘ASC’ to manually sort queries by this order.”

    ‘order should be ‘order

    2.
    When ordering sub taxonomies and using

    $args = array('orderby' => 'term_order', 'order' => 'ASC');
        $ordered = wp_get_object_terms($post_ids, 'taxonomy',$args);

    term_order in sub categories overlaps parents order

    <select><option value="">Tipologia</option>
    <option data-or="0" value="5">Appartamento</option>
    <option data-or="1" value="29"> - miniappartamento</option>
    <option data-or="1" value="8">Casa indipendente</option>
    <option data-or="2" value="30"> - bicamere</option>
    <option data-or="2" value="20">Casa in linea</option>
    <option data-or="3" value="31"> - tricamere</option>
    <option data-or="4" value="32"> - quadricamere o più</option>
    <option data-or="4" value="13">Villa</option>
    <option data-or="5" value="14">Villa a schiera/Villa bifamiliare</option>
    <option data-or="10" value="37">capannone</option>
    <option data-or="11" value="36">negozio</option>
    <option data-or="12" value="35">ufficio</option>
    <option data-or="13" value="34">Terreno</option>
    </select>

    data-or is term_order, as you can see options are ordered by term_order AND (not what i want) alphabetically and there are dupplicates in term_order

    Maybe correct output should be (as in backend)

    <select><option value="">Tipologia</option>
    <option data-or="0" value="5">Appartamento</option>
    <option data-or="1" value="29"> - miniappartamento</option>
    <option data-or="2" value="30"> - bicamere</option>
    <option data-or="3" value="31"> - tricamere</option>
    <option data-or="4" value="32"> - quadricamere o più</option>
    <option data-or="5" value="20">Casa in linea</option>
    <option data-or="6" value="8">Casa indipendente</option>
    <option data-or="7" value="13">Villa</option>
    <option data-or="8" value="14">Villa a schiera/Villa bifamiliare</option>
    <option data-or="9" value="37">capannone</option>
    <option data-or="10" value="36">negozio</option>
    <option data-or="11" value="35">ufficio</option>
    <option data-or="12" value="34">Terreno</option>
    </select>

    Any clue?

    https://www.ads-software.com/plugins/custom-taxonomy-order-ne/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi, I don’t know of a current way to make this issue better.
    It is added as a todo to the plugin file. If someone has a bright idea on how to tackle this, let me know.

    Plugin Author Marcel Pol

    (@mpol)

    Hi,
    Could you test with what currently is in trunk?
    The sorting should now be:
    parent – child
    where each child gets sorted after the parent.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Installation order sub categories’ is closed to new replies.