Advertisement
pedmands

archive.php

Oct 7th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template for displaying all single posts.
  4.  *
  5.  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
  6.  *
  7.  * @package Lance
  8.  */
  9.  
  10. get_header(); ?>
  11.  
  12. <div id="primary" class="content-area">
  13.     <main id="main" class="site-main" role="main">
  14.         <header class="page-header">
  15.             <?php
  16.                 the_archive_title( '<h1 class="page-title">', '</h1>' );
  17.                 the_archive_description( '<div class="taxonomy-description">', '</div>' );
  18.             ?>
  19.         </header><!-- .page-header -->
  20.  
  21.  
  22.         <div id="projects">
  23.             <?php while ( have_posts() ) : the_post();
  24.             echo '<div class="project hvr-float">';
  25.             echo '<a class="" href="' . get_permalink() . '" title="Learn more about ' . get_the_title() . '">';
  26.             echo '<span class="cover">';
  27.             the_post_thumbnail('project-thumb');
  28.             echo '<div class="project-caption">';
  29.             echo '<h1 class="project-title">' . get_the_title() . '</h1>';
  30.              if ( 'projects' == get_post_type()) {
  31.             echo get_the_term_list($post->ID, 'clients', '<h1 class="project-client">', '</h1><h1 class="project-client">', '</h1>' );
  32.             }
  33.             else {
  34.              echo get_the_term_list($post->ID, 'year', '<h1 class="project-client">', '</h1><h1 class="project-client">', '</h1>' );
  35.             }
  36.             echo '</div>';
  37.             echo '</span>';
  38.             echo '</a>';
  39.             echo '</div>';
  40.  
  41.             endwhile; // End of the loop.
  42.             ?>
  43.         </div>
  44.        
  45.     </main><!-- #main -->
  46. </div><!-- #primary -->
  47.  
  48. <?php
  49. get_sidebar();
  50. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement