1,
'title' => '',
'columns' => 2,
'limit' => -1,
'splash' => '',
'loadmore' => 'off',
'order' => 'default',
'revealfx' => ''
);
$atts = apply_filters( 'aesop_collection_defaults', shortcode_atts( $defaults, $atts ) );
// let this be used multiple times
static $instance = 0;
$instance++;
$unique = sprintf( '%s-%s', get_the_ID(), $instance );
ob_start();
$col = $atts['columns'] ? preg_replace( '/[^0-9]/', '', $atts['columns'] ) : null;
$splash_class = 'on' == $atts['splash'] ? 'aesop-collection-splash' : null;
// custom classes
$classes = function_exists( 'aesop_component_classes' ) ? aesop_component_classes( 'collections', '' ) : null;
$hidden ="";
if (aesop_revealfx_set($atts)) {
$hidden ='style="visibility:hidden;"';
}
do_action( 'aesop_collection_before', $atts, $unique ); // action
?>
class="aesop-story-collection aesop-component ">
'name',
'order' => 'ASC'
);
// get cached query
$cats = wp_cache_get( 'aesop_splash_query_'.$atts['collection'] );
// if no cached query then cache the query
if ( false == $cats ) {
$cats = get_categories( apply_filters( 'aesop_splash_query', $cat_args ) );
wp_cache_set( 'aesop_splash_query_'.$atts['collection'], $cats );
}
if ( $cats ):
foreach ( $cats as $cat ) {
?>
array( 'date' => $order ),
'posts_per_page' => $atts['limit'],
'cat' => $atts['collection'],
'ignore_sticky' => true,
'paged' => 1
);
// do not use cache any more
//$query = wp_cache_get( 'aesop_collection_query_' . $atts['collection'] );
$query = new wp_query( apply_filters( 'aesop_collection_query', $args ) );
wp_cache_set( 'aesop_collection_query_' . $atts['collection'] , $query );
$maxpages = $query->max_num_pages;
// loop through the stories
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
$coverimg = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'large' );
?>
1) {
?>