• I’m running this plugin with WPML and nothing shows up in my loop when I’m running it.

    I added ‘suppress_filters’ => 1 to my args array and the pages appear but they are still out of order.

    Here’s my code, maybe I’m doing something wrong?

    $args = array(
    				'order' => 'ASC',
    				'orderby' => 'menu_order',
    				'output' => ARRAY_A,
    				'output_key' => 'menu_order'
    			);
    
    	$items_objs = wp_get_nav_menu_items( 'main_nav', $args );
    	$items = array();
    
    	foreach( $items_objs as $obj ) {
    		$items[] = $obj->object_id;
    	}
    
    	$args = array(
    		'post_type' => 'page',
    		'post_count' => -1,
    		'post__in' => $items,
    		'orderby' => 'post__in',
    		'order' => 'ASC',
    		'suppress_filters' => 1
    	);
    
    	$pages = new WP_Query( $args );
  • The topic ‘Doesn't seem to work with WPML’ is closed to new replies.