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; }
<?php /***********************************/ /**** Gallery Archive Template ****/ /***********************************/ // Show the galleries as tiles $args = array('post_type' => 'ac_gallery', 'posts_per_page' => -1, 'column_count' => 4, 'layout' => 'tile', 'meta_key' => null, 'post__not_in' => ac_gallery_get_posts_to_ignore()); echo ac_posts_tile($args);