protected function filter_posts($args) { parent::filter_posts($args); // We need to exclude the Homepage and Tash galleries from the general results $ids_to_ignore = ac_gallery_get_posts_to_ignore(); $args['post__not_in'] = $ids_to_ignore; // Clear meta_key which is used to only show posts with thumbnails, as ac_gallery doesn't have a thumbnail $args['meta_key'] = ''; return $args; }
protected function filter_posts($args) { parent::filter_posts($args); // Setup image args $args['meta_key'] = null; $args['post_mime_type'] = 'image'; $args['post_status'] = null; // Force order as we always want to observe the menu order set by the gallert $args['orderby'] = 'menu_order'; $args['order'] = 'ASC'; return $args; }