Skip to content

Instantly share code, notes, and snippets.

@andrescifuentesr
andrescifuentesr / WPSlider
Last active Dec 28, 2015
WordPress: slider with responsive-slides.viljamis.com
View WPSlider
<?php
$args = array(
'post_parent' => $post->ID, // For the current post
'post_type' => 'attachment', // Get all post attachments
'post_mime_type' => 'image', // Only grab images
'order' => 'ASC', // List in ascending order
'orderby' => 'rand', // List them in their menu order
'numberposts' => -1, // Show all attachments
'post_status' => null, // For any post status
);