Ejemplo n.º 1
0
        wp_mail($emailTo, $subject, $body, $headers);
        $emailSent = true;
    }
}
get_header();
?>

	<main id="main" class="site-main page-cover page-cover--<?php 
echo get_the_ID();
?>
">

		<div class="page-cover__background"></div>

		<?php 
stag_post_background_css(get_the_ID(), '.page-cover--', '.page-cover__background');
?>

		<?php 
while (have_posts()) {
    the_post();
    ?>

			<?php 
    get_template_part('content', 'page');
    ?>

		<?php 
}
// end of the loop.
?>
// Get post Categories
$categories_list = get_the_category_list(', ');
// Get Featured Image's caption
$thumb_post = get_post(get_post_thumbnail_id());
$caption = $thumb_post->post_excerpt;
$videos = array('video/mp4' => stag_get_post_meta('settings', $post_id, 'post-video-mp4'), 'video/webm' => stag_get_post_meta('settings', $post_id, 'post-video-webm'), 'video/ogv' => stag_get_post_meta('settings', $post_id, 'post-video-ogv'));
$videos = array_filter($videos);
// Hide videos if the post is restricted or password protected
$restricted_condition = count($videos) && !stag_rcp_user_has_no_access() && !post_password_required();
// Get CSS3 background filter option
$background_filter = stag_get_post_meta('settings', $post_id, 'post-background-filter');
if (!$background_filter) {
    $background_filter = 'none';
}
// Output post cover CSS
stag_post_background_css();
?>

<div class="article-cover article-cover--<?php 
echo esc_attr(get_the_ID());
if ($restricted_condition) {
    echo ' has-video';
}
?>
">
	<div class="article-cover__background stag-image--<?php 
echo esc_attr($background_filter);
?>
"></div>

	<?php