• Hello,
    This is great plugin but I cannot make it work with my query
    wp_get_post_terms
    Before my order was alphabetical.

    I added the ‘orderby’ => ‘term_order’ but it only makes the order messy.
    I cannot find a solution here.
    Thanks.

    $tax_terms = wp_get_post_terms($post->ID, ‘portfolio-type’, array(“fields” => “names”, ‘orderby’ => ‘term_order’));

    http://wordpress.org/extend/plugins/taxonomy-terms-order/

Viewing 1 replies (of 1 total)
  • Plugin Author nsp-code

    (@nsp-code)

    Hello,
    Sorry but it will not work with wp_get_post_terms as it will become ambigous. Since a post can contain terms from different taxonomies, there is no criteria to establish a term order prior another. You should separately retrieve the terms order using get_terms, then apply that to the wp_get_post_terms() results accordingly to your algorithm.
    Hope it make sense.

Viewing 1 replies (of 1 total)
  • The topic ‘Not working with wp_get_post_terms’ is closed to new replies.