<?php

/**
 * The template for displaying Archive pages.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package Edin
 */
get_header();
?>

	<div class="hero <?php 
echo edin_additional_class();
?>
">
		<?php 
if (have_posts()) {
    ?>

			<div class="hero-wrapper">
				<h1 class="page-title">
					<?php 
    if (is_category()) {
        single_cat_title();
    } elseif (is_tag()) {
        single_tag_title();
    } elseif (is_author()) {
        printf(__('Author: %s', 'edin'), '<span class="vcard">' . get_the_author() . '</span>');
    } elseif (is_day()) {
        printf(__('Day: %s', 'edin'), '<span>' . get_the_date() . '</span>');
Exemplo n.º 2
0
function edin_featured_pages()
{
    $featured_page_1 = esc_attr(get_theme_mod('edin_featured_page_one_front_page', '0'));
    $featured_page_2 = esc_attr(get_theme_mod('edin_featured_page_two_front_page', '0'));
    $featured_page_3 = esc_attr(get_theme_mod('edin_featured_page_three_front_page', '0'));
    if (0 == $featured_page_1 && 0 == $featured_page_2 && 0 == $featured_page_3) {
        return;
    }
    ?>

	<div id="quaternary" class="featured-page-area">
		<div class="featured-page-wrapper clear">

			<?php 
    for ($page_number = 1; $page_number <= 3; $page_number++) {
        ?>
				<?php 
        if (0 != ${'featured_page_' . $page_number}) {
            // Check if a featured page has been set in the customizer
            ?>
					<div class="featured-page">

						<?php 
            // Create new argument using the page ID of the page set in the customizer
            $featured_page_args = array('page_id' => ${'featured_page_' . $page_number});
            // Create a new WP_Query using the argument previously created
            $featured_page_query = new WP_Query($featured_page_args);
            ?>

						<?php 
            while ($featured_page_query->have_posts()) {
                $featured_page_query->the_post();
                ?>

							<div class="hero <?php 
                echo edin_additional_class();
                ?>
">
	<?php 
                if (!is_page_template('page-templates/front-page.php')) {
                    ?>

		<?php 
                    the_title('<div class="hero-wrapper"><h1 class="page-title">', '</h1></div>');
                    ?>

	<?php 
                } else {
                    ?>

		<article id="post-<?php 
                    the_ID();
                    ?>
" <?php 
                    post_class();
                    ?>
>
			<?php 
                    if (1 == get_theme_mod('edin_title_front_page')) {
                        the_title('<header class="entry-header"><h1 class="page-title">', '</h1></header>');
                    }
                    ?>
			<div class="entry-content">
				<?php 
                    the_content();
                    ?>
				<?php 
                    wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'edin'), 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>'));
                    ?>
			</div><!-- .entry-content -->
			<?php 
                    edit_post_link(__('Edit', 'edin'), '<footer class="entry-footer"><span class="edit-link">', '</span></footer>');
                    ?>
		</article><!-- #post-## -->

	<?php 
                }
                ?>
</div><!-- .hero -->

<?php 
                if (!function_exists('jetpack_breadcrumbs') || 0 == get_theme_mod('edin_breadcrumbs') || !is_page() || is_page_template('page-templates/front-page.php') || is_front_page()) {
                    return;
                }
                ?>

<div class="breadcrumbs-wrapper">
	<?php 
                jetpack_breadcrumbs();
                ?>
</div><!-- .breadcrumbs-wrapper -->


						<?php 
            }
            wp_reset_postdata();
            ?>
					</div><!-- .featured-page -->
				<?php 
        }
        ?>
			<?php 
    }
    ?>

		</div><!-- .featured-page-wrapper -->
	</div><!-- #quaternary -->

<?php 
}