Created
March 14, 2014 07:45
-
-
Save hasdavidc/9543582 to your computer and use it in GitHub Desktop.
pertinent get_slides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The main query for extracting the slides for the slideshow | |
*/ | |
public function get_slides() { | |
$args = array( | |
'force_no_custom_order' => true, | |
'orderby' => 'menu_order', | |
'order' => 'ASC', | |
'post_type' => 'attachment', | |
'post_status' => 'inherit', | |
'lang' => '', // polylang, ingore language filter | |
'suppress_filters' => 1, // wpml, ignore language filter | |
'posts_per_page' => -1, | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'ml-slider', | |
'field' => 'slug', | |
'terms' => $this->id | |
) | |
) | |
); | |
$args = apply_filters('metaslider_populate_slides_args', $args, $this->id, $this->settings); | |
$query = new WP_Query($args); | |
return $query; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment