Created
November 4, 2016 16:21
-
-
Save thierrypigot/90548af9a9a29347ab1ee1bf5dbf79af to your computer and use it in GitHub Desktop.
This file contains 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(); ?> | |
<?php $hierarchical_keywords = get_query_var( 'hierarchical_keywords' ); ?> | |
<div class="fl-archive container"> | |
<div class="row"> | |
<?php FLTheme::sidebar('left'); ?> | |
<div class="fl-content <?php FLTheme::content_class(); ?>" itemscope="itemscope" itemtype="http://schema.org/Blog"> | |
<?php FLTheme::archive_page_header(); ?> | |
<h1><?php echo esc_html( $hierarchical_keywords ); ?></h1> | |
<?php | |
$args = array( | |
'post_status' => 'inherit', | |
'posts_per_page' => -1, | |
'post_type' => 'attachment', | |
); | |
$args['tax_query'] = array( | |
array( | |
'taxonomy' => 'hierarchical_keywords', | |
'terms' => array( $hierarchical_keywords ), | |
'field' => 'slug', | |
), | |
); | |
$the_query = new WP_Query( $args ); | |
if ( $the_query->have_posts() ) { | |
while ( $the_query->have_posts() ) { | |
$the_query->the_post(); | |
echo wp_get_attachment_image( get_the_ID(), array('700', '600'), "", array( "class" => "img-responsive" ) ); | |
} | |
} | |
/* Restore original Post Data */ | |
wp_reset_postdata(); | |
?> | |
</div> | |
<?php FLTheme::sidebar('right'); ?> | |
</div> | |
</div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment