Query posts and display all dates in repeater field in chronological order

I think I succeeded in making the array and sorting it by date (see var_dump) array(575) { [320]=> array(10) { [“Speeldatum”]=> string(19) “2015-01-30 12:00:00” [“Productienaam”]=> string(28) “THE DOG DAYS ARE OVER (2014)” [“Makernaam”]=> string(11) “Jan Martens” [“Locatienaam2”]=> string(10) “toneelhuis” [“Stadnaam”]=> string(9) “ANTWERPEN” [“Landnaam”]=> string(2) “BE” [“Festivalnaam”]=> string(18) “antwerpse kleppers” [“Onderdeelvandezegripeveningnaam”]=> string(38) “antwerpse kleppers / bourla … Read more

Split Content and Gallery

Open to anybody who can simplify this but here’s what I came up with that worked for me. First thing’s first – get the gallery, using get_post_gallery(), as soon as the loop starts: <?php if( have_posts() ) : ?> <?php while( have_posts() ) : the_post(); $gallery = get_post_gallery(); $content = strip_shortcode_gallery( get_the_content() ); ?> <div … Read more

I have 3 categories, i want to display on a loop the last 3 of every category

If you dont have the same post with more than 1 category, you can do: $args = array( ‘cat’ => $category->term_id, ‘post_type’ => ‘post’, ‘posts_per_page’ => ‘3’, ); $query = new WP_Query( $args ); if ( $query->have_posts() ) { ?> <section class=”<?php echo $category->name; ?> listing”> <h2>Latest in <?php echo $category->name; ?>:</h2> <?php while ( … Read more