Event Gallery
[php] $custom_args = array( 'post_type' => 'post', 'cat' => 17, 'post_status' => 'publish', 'orderby' => 'post_date', 'order' => 'ASC', ); $custom_query = new WP_Query($custom_args); if ($custom_query->have_posts()) { while ($custom_query->have_posts()) : $custom_query->the_post(); $featured_img_url = get_the_post_thumbnail_url( $post->ID,'full'); $postFields = get_fields($post->ID); $detailLink = true; $newTab = false; if (isset($postFields['enable_detail_page_link']) && $postFields['enable_detail_page_link'] == 'false') { $detailLink = false; } $detailUrl = esc_url(get_permalink($post->ID)); if (isset($postFields['custom_detail_page_link']) && $postFields['custom_detail_page_link'] == 'internal') { $detailUrl = $postFields['internal_link'][0]->guid; $newTab = true; } [/php] [php] endwhile; } else { [/php]
[php] _e("We didn't find any results"); [/php]
[php] } [/php] [php] wp_reset_query(); [/php]