WordPress.org

Ready to get started?Download WordPress

Forums

Post Types Order
[resolved] Order didnt work then i save from taxonomy filter (2 posts)

  1. manaraga
    Member
    Posted 1 year ago #

    If a order and save from taxonomy filter i didnt see result. But when i order and save form archive (all posts) then i see result! We saving from tax not applied?

    Query what i used is:
    WP_Query(array('orderby' => 'menu_order', 'order' => 'DESC', 'showposts' => -1,'cat' => $cat, 'tax_query' => array('relation' => 'AND', array('taxonomy' => 'brands', 'field' => 'id', 'terms' => $brand), $country1, $country2)));

    http://wordpress.org/extend/plugins/post-types-order/

  2. manaraga
    Member
    Posted 1 year ago #

    I solved its by myself! Moving cat to the tax_query allowed show correct order by tax!

    This works:
    WP_Query(array('orderby' => 'menu_order', 'order' => 'DESC', 'showposts' => -1, 'tax_query' => array('relation' => 'AND', array('taxonomy' => 'brands', 'field' => 'slug', 'terms' => $term), array('taxonomy' => 'category', 'field' => 'id', 'terms' => $child2), $country1, $country2)));

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.