Advertisement
hmbashar

Custom Taxonomy Archive Query

Dec 18th, 2015
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.00 KB | None | 0 0
  1.        
  2.         <?php if(have_posts()) : ?>
  3.             <header class="page-header">
  4.                 <?php
  5.                     the_archive_title( '<h1 class="page-title">', '</h1>' );
  6.                     the_archive_description( '<div class="taxonomy-description">', '</div>' );
  7.                 ?>
  8.             </header><!-- .page-header -->
  9.  
  10.            
  11.                 <?php while (have_posts()) : the_post(); ?>
  12.  
  13.                         <!--single post start -->
  14.                         <article class="single_article floatleft">
  15.                             <div class="single_article_img">
  16.                                 <a href="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>" title="<?php the_title();?>" target="_blank"><?php the_post_thumbnail(); ?></a>
  17.                             </div>
  18.                         </article>
  19.                         <!--single post end -->
  20.  
  21.    
  22.                     <?php endwhile; ?>
  23.                
  24.                     <?php else : ?>
  25.                    
  26.                                 <header class="page-header">
  27.                 <?php
  28.                     the_archive_title( '<h1 class="page-title">', '</h1>'.'Not Found' );
  29.                     the_archive_description( '<div class="taxonomy-description">', '</div>' );
  30.                 ?>
  31.             </header><!-- .page-header -->
  32.  
  33.                    
  34.                     <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement