Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template for displaying archive pages.
- *
- * Learn more: http://codex.wordpress.org/Template_Hierarchy
- *
- * @package faccin
- */
- get_header(); ?>
- <?php global $wp_query; ?>
- </div> <!-- /. container -->
- <div id="primary" class="content-area">
- <main id="main" class="site-main clearfix" role="main">
- <div class="container">
- <?php
- if (function_exists('yoast_breadcrumb')) {
- yoast_breadcrumb('<p id="breadcrumbs">', '</p>');
- }
- ?>
- <?php if( is_user_logged_in() ) : ?>
- <div class="rows full-width">
- <div class="col-md-12 col-sm-12 grey-background taxonomy-wrapper">
- <h3><?php the_field('categorie_label', 'option'); ?></h3>
- <?php
- $taxonomy = 'case_studies';
- $terms = get_terms($taxonomy ,array( 'hide_empty' => false)); // Get all terms of a taxonomy
- if ( $terms && !is_wp_error( $terms ) ) :
- ?>
- <ul class="category-names">
- <?php foreach ( $terms as $term ) { ?>
- <li class="single-category-name-wrapper col-md-2">
- <span class="category-name">
- <?php echo $term->name; ?>
- </span>
- <!-- <ul class="category-posts"> -->
- <?php /*
- $posts_studies = new WP_Query(
- array(
- 'post_type' => 'case_study',
- 'posts_per_page' => -1,
- 'tax_query' => array(
- array(
- 'taxonomy' => 'case_studies',
- 'terms' => $term->term_id,
- )
- )
- )
- );
- if( $posts_studies->have_posts() ){
- while( $posts_studies->have_posts() ){
- $posts_studies->the_post();
- ?>
- <li class="single-category-post-name">
- <a href="<?php the_permalink(); ?>">
- <?php the_title(); ?>
- </a>
- </li>
- <?php
- }
- }
- */
- ?>
- <!-- </ul> -->
- </li>
- <?php } ?>
- </ul>
- <?php endif;?>
- </div>
- <div class="col-md-8 col-sm-8 pull-right taxonomy-image-wrap">
- <div class="taxonomy-image-wrap-inner">
- <h2 class="text-left content-title"><?php the_field('case_study_label', 'option'); ?></h2>
- <div class="posts-right-archive">
- <ul class="category-posts">
- <?php
- $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
- if( have_posts() ){
- while( have_posts() ){
- the_post();
- ?>
- <li class="single-study-wrapper clearfix">
- <div class="study-thumbnail-wrapper col-md-3">
- <a href="<?php the_permalink(); ?>">
- <?php the_post_thumbnail('study_archive'); ?>
- </a>
- </div>
- <div class="col-md-9 study-text-content-wrapper">
- <h4 class="study-title">
- <a href="<?php the_permalink(); ?>">
- <?php the_title(); ?>
- </a>
- </h4>
- <div class="study-excerpt">
- <?php the_excerpt(); ?>
- </div>
- <div class="study-read-more">
- <a href="<?php the_permalink(); ?>"><?php the_field('see_more', 'option'); ?></a>
- <div class="download-circle">
- <i class="fa fa-long-arrow-right" aria-hidden="true"></i>|
- </div>
- </div>
- </div>
- </li>
- <?php
- }
- //
- $big = 999999999; // need an unlikely integer
- echo paginate_links( array(
- 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
- 'format' => '?paged=%#%',
- 'current' => max( 1, get_query_var('paged') ),
- 'total' => $wp_query->max_num_pages,
- 'prev_text' => __('«'),
- 'next_text' => __('»'),
- ) );
- }
- ?>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <?php else : ?>
- <script>
- window.location.href= "<?php echo the_permalink(272); ?>";
- </script>
- <?php endif; ?>
- </div>
- </main><!-- #main -->
- </div><!-- #primary -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement