Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter stueynet

    (@stueynet)

    Solved the issue. So here is the problem. I had a custom pre-get_posts filter. Sadly, when you apply this, apparently it changes the order back to default unless you specify otherwise. So initially I had:

    if ($query->is_search) {
    			$query->set('post_type', array('project'));
    			$query->set('meta_key', 'list_only');
    			$query->set('meta_value', '1');

    I had to change that to

    if ($query->is_search) {
    			$query->set('post_type', array('project'));
    			$query->set('meta_key', 'list_only');
    			$query->set('meta_value', '1');
    			$query->set('orderby', 'menu_order');
    			$query->set('order', 'ASC');

    Thank you it was very helpful.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Posts not ordering on Term Archive pages’ is closed to new replies.