Advertisement
Guest User

taxonomy.php

a guest
Sep 5th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.16 KB | None | 0 0
  1. <?php get_header(); ?>
  2.         <section class="row">
  3.             <div class="span4">
  4.                 <?php get_sidebar(); ?>
  5.             </div>
  6.             <div class="span8" id="productDetails">
  7.                 <ul class="nav nav-tabs">
  8.                     <li class="active"><a href="#sr" data-toggle="tab">Search Results</a></li>
  9.                     <li><a href="#pf" data-toggle="tab">Printing Features</a></li>
  10.                     <li><a href="#ps" data-toggle="tab">Production Speed</a></li>
  11.                     <li><a href="#sq" data-toggle="tab">Stock Quality</a></li>
  12.                 </ul>
  13.                 <section class="tab-content">
  14.                     <article class="tab-pane active" id="sr">  
  15.                        
  16.                         <?php
  17.                        
  18.                         if ( have_posts() ) :
  19.                          while ( have_posts() ) : the_post();
  20.  
  21.                                         // get the post terms
  22.                                         $post_terms = get_the_terms( $post->ID, 'branding' );
  23.  
  24.                                         if ( $post_terms ) {
  25.  
  26.                                             $post_terms = array_values( $post_terms );
  27.  
  28.                                             foreach ( $post_terms as $key => $term ) {
  29.                                                 $desc = absint( $term->description );
  30.                                                 if ( !$desc ) {
  31.                                                     unset($post_terms[ $key ]);
  32.                                                 }
  33.                                             }
  34.  
  35.                                             if ( $post_terms ) {
  36.                                                 usort($post_terms,'sort_category_rating_terms');
  37.  
  38.                                                 foreach ( $post_terms as $term ) {
  39.                                                     echo 'category = ' . $term->name;
  40.                                                     echo ' rating = ' . $term->description;
  41.                                                     echo '<br>';
  42.                                                 }
  43.  
  44.                                             }
  45.                                         }
  46.  
  47.                                        
  48.                         endwhile;
  49.                         else : ?>
  50.  
  51.                             <article id="post-0" class="post no-results not-found">
  52.                                 <header class="entry-header">
  53.                                     <h1 class="entry-title"><?php _e( 'No Match Found.', 'twentyeleven' ); ?></h1>
  54.                                 </header><!-- .entry-header -->
  55.                                     <p><?php _e( 'Try a different combination or check out these products.', 'twentyeleven' ); ?></p>
  56.                                    
  57.                             </article><!-- #post-0 -->
  58.                         <?php endif; ?>    
  59.                        
  60.                        
  61.                     </article>
  62.                
  63.                      
  64.                 </section>
  65.             </div>
  66.         </section>
  67. <?php get_template_part( 'testimonial', 'page' ); ?>
  68. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement