passing argument to get_template_part() or a better way to code
Why don’t you use a simple function with an argument to achieve that, the code is something like this: function wpse63585_event_list( $fresh = true ) { echo ‘<ul class=”event-items”>’; $yesterday = time() – 24*60*60; $compare = $fresh ? ‘>’ : ‘<‘; $args = array( ‘post_type’ => ‘wr_event’, ‘posts_per_page’ => -1, // show all posts ‘meta_key’ … Read more