Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pertinent get_slides
<?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