Advertisement
Guest User

Untitled

a guest
Aug 1st, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.13 KB | None | 0 0
  1. <?php
  2.  
  3. ?>
  4.  
  5. <div id="header_placeholder"></div>
  6. <section class="container">
  7.     <header class="row">
  8.         <div class="col-md-12">
  9.             <?php // @todo We need to make use of this <h1> here or to redesign html/css, it can't be commented out. ?>
  10.             <!--            <h1 class="title-portfolio">Portfolio Two Columns</h1>-->
  11.             <?php // @todo This filtering should be part of some function if used at all.
  12.             // @todo Get post categories and print out all those.
  13.             ?>
  14.             <ul id="filter-list" class="clearfix pull-left">
  15.                 <li class="filter all" data-filter="all">All</li>
  16.                 <li class="filter web" data-filter="webdesign">Web Design</li>
  17.                 <li class="filter print" data-filter="print">Print</li>
  18.                 <li class="filter brending" data-filter="brending">Branding</li>
  19.             </ul>
  20.         </div>
  21.     </header>
  22. </section>
  23. <section class="container">
  24.     <?php // @todo Difference between those templates are in <ul> class below, e.g. two-column and in <li> class, e.g. col-md-6.
  25.     // @todo Should be checked and created optimal non-redundant solution
  26.     ?>
  27.     <ul id="portfolio" class="row two-column">
  28.         <?php
  29.         // @todo Pagination is missing. See how it can be used with filtering.
  30.         $team_posts = get_posts(
  31.             array(
  32.                 'post_type' => 'portfolio',
  33.                 'posts_per_page' => -1,
  34.                 'orderby' => 'title',
  35.             )
  36.         );
  37.         if ($team_posts):
  38.         foreach ($team_posts as $post):
  39.             setup_postdata($post);
  40.             ?>
  41.             <?php // @todo Item must have appropriate class in order filtering to work properly. ?>
  42.             <li class="item col-md-6">
  43.                 <aside class="overlay imagebox" role="complementary">
  44.                     <?php // @todo Decide whether we prefer fixed height/width images or ones user upload. ?>
  45.                     <?php echo the_post_thumbnail(); ?>
  46.                     <a class="img-control control-right" href="<?php the_permalink(); ?>"><i class="fa fa-link"></i></a>
  47.                 </aside>
  48.                 <article>
  49.                     <h3><?php the_title(); ?></h3>
  50.                     <?php
  51.                     $terms = wp_get_post_terms(get_the_ID(), 'portfolio_category');?>
  52.  
  53.                     <h5>
  54.                         <?php
  55.                         // @todo See if post can have multiple categories.
  56.                         foreach ($terms as $term) {
  57.                             echo $term->name . ' ';
  58.                         }
  59.                         ?>
  60.                     </h5>
  61.  
  62.                     <p class="par-grey par-margin"><?php the_content(); ?></p>
  63.                     <a href="<?php the_permalink(); ?>">
  64.                         <?php // @todo "View Project" should not be static. ?>
  65.                         <button type="button" class="btn link-btn">View Project</button>
  66.                     </a>
  67.  
  68.                     <div class="separator"/>
  69.                 </article>
  70.             </li>
  71.         <?php endforeach; ?>
  72.     </ul>
  73. <?php endif; ?>
  74. </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement