<main role="main" class="al-container al-content"> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <header class=""> <h1 class="al-heading--primary"> <?php print get_the_post_meta('candidate_position'); ?> </h1> <div class="al-location"><span class="fa fa-map-marker"></span> <?php print get_the_post_meta('candidate_location'); ?> </div> </header> <div class="al-margin--m"> <?php the_content(); ?> </div> <?php get_theme_part('partials/cta'); ?>
<div class="al-container al-relative"> <div class="al-promo__brand"></div> </div> <div class="js-main-slider cf"> <?php while ($the_query->have_posts()) { $the_query->the_post(); ?> <?php $slide_bg = get_the_post_meta('slide_bg'); $slide_title = get_the_post_meta('slide_title'); $slide_description = get_the_post_meta('slide_description'); $slide_cta_text = get_the_post_meta('slide_cta_text'); $slide_cta_link = get_the_post_meta('slide_cta_link'); ?> <div class="al-promo-slide" style="background-image: url(<?php echo $slide_bg; ?> )"> <div class="al-container al-relative cf"> <div class="al-promo-slide__content"> <div class="al-promo-slide__title"><?php echo $slide_title; ?> </div> <div class="al-promo-slide__description"><?php echo $slide_description;
/** * Output post meta value * */ function the_post_meta($key, $default = '') { echo get_the_post_meta($key) ? get_the_post_meta($key) : $default; }
function has_the_post_meta($name) { $meta = get_the_post_meta($name); return !empty($meta); }
?> <div class="al-grid__item al-grid__item--third"> <div class="al-card"> <header class=" al-card__header"> <h3 class="al-card__title"><a href="<?php the_permalink(); ?> "> <?php the_title(); ?> </a></h3> <div class="al-card__location al-location"><span class="fa fa-map-marker"></span> <?php print get_the_post_meta('vacancy_location'); ?> </div> </header> <div class="al-card__description"> <?php the_excerpt(); ?> </div> <a href="<?php the_permalink(); ?> " class="al-btn al-btn--secondary al-btn--regular al-margin--xs">apply now</a> </div> </div> <?php