Created
May 17, 2016 20:56
-
-
Save ronalfy/9ed0587b52a8eedd771166b87174f601 to your computer and use it in GitHub Desktop.
Archive Gallery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<div class="content-wrapper internal"> | |
<main id="main-content" role="main"> | |
<?php | |
$maybe_page_title = custom_theme_cpt_get_option( 'gallery', 'archive-title' ); | |
if ( empty( $maybe_page_title ) || false == $maybe_page_title ) { | |
$maybe_page_title = 'Galleries'; | |
} | |
?> | |
<h1 class="page-title"><?php echo esc_html( $maybe_page_title ); ?></h1> | |
<?php | |
$maybe_cpt_content = custom_theme_cpt_get_option( 'gallery', 'cpt-content' ); | |
if ( false !== $maybe_cpt_content && ! empty( $maybe_cpt_content ) ) { | |
?> | |
<section> | |
<?php echo apply_filters( 'the_content', $maybe_cpt_content ); ?> | |
</section> | |
<?php | |
} | |
?> | |
<section> | |
<?php | |
if ( have_posts() ) { | |
while ( have_posts() ) { | |
the_post(); | |
get_template_part( 'content', 'gallery' ); | |
} | |
} else { | |
get_template_part( 'content', 'none' ); | |
} | |
?> | |
</section><!-- /section --> | |
</main> | |
</div><!--main-wrapper--> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment