'page', 'meta_query' => array( array( 'key' => 'show_in_footer', 'value' => '1', 'compare' => '==', // not really needed, this is the default ) ), ); $footerItems = new WP_Query( $wpQuery ); $footerItems = $footerItems->posts; } else { $seperatePage = false; } ?>
'artists', 'post_status' => 'publish', 'meta_key' => 'last_name', 'orderby' => 'meta_value', 'order' => 'ASC', ); $alumni = new WP_Query( $wpQuery ); $alumni = $alumni->posts; //print_r($alumni); foreach( $alumni as $nr => $alumnus ){ $alumni[$nr]->first_name = get_field('first_name', $alumni[$nr]); $alumni[$nr]->last_name = get_field('last_name', $alumni[$nr]); $alumni[$nr]->overview_image = get_field('overview_image', $alumni[$nr]); $obImage = $alumni[$nr]->overview_image; $alumni[$nr]->has_own_page = get_field('has_own_page', $alumni[$nr]); $tag = $alumnus->has_own_page ? 'a' : 'div'; $link = $alumnus->has_own_page ? 'href="' . $siteVars['url'] . $alumnus->post_type . '/' . $alumnus->post_name . '"' : ''; ?> < class="block__column block__column--third fader">