danstramer

taxonomy-products_category.php | Taxonomy page

Apr 9th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.58 KB | None | 0 0
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  3. $display_type = po_get_display_type();
  4. ?>
  5.  
  6. <header class="entry-header">
  7.  
  8.     <?php if ( po_breadcrumbs_need_to_show() ) : ?>
  9.         <?php pojo_breadcrumbs(); ?>
  10.     <?php endif; ?>
  11.    
  12.             <h1 class="page-title"><?php echo $term->name; ?>Archives</h1>
  13.    
  14. </header>
  15. <?php
  16.  
  17.  
  18. global $wp_query;
  19. $args = array_merge( $wp_query->query, array( 'post_type' => 'products' ) );
  20. query_posts( $args );
  21.  
  22. ?>
  23. products category taxonomy
  24. <?php if ( have_posts() ) : ?>
  25.     <?php do_action( 'pojo_before_content_loop', $display_type ); ?>
  26.     <?php while ( have_posts() ) : the_post(); ?>
  27.          <li class="product-grid" id="post-<?php the_ID(); ?>">
  28.             <a href="<?php the_permalink(); ?>">
  29.             <div class="image"><?php  if ( has_post_thumbnail() ) {
  30.     the_post_thumbnail('thumbnail');
  31. }?>  </div>
  32.             <h3><?php the_title(); ?></h3></a>
  33.             <div class="product-price"><span>₪</span><?php the_field('price'); ?></div>
  34.            
  35.               <?php
  36.                   //http://wpquestions.com/question/showChrono/id/9730
  37.  
  38.         $values = get_field('features');
  39.         if($values)
  40.         {
  41.             echo '<ul class="features">';
  42.             foreach($values as $value)
  43.             {
  44.                 echo '<li><img src="'.get_bloginfo('stylesheet_directory').'/images/' . $value . '.png"></li>';
  45.  
  46.             }
  47.             echo '</ul>';
  48.         }
  49.         ?>
  50.            
  51.            
  52.         </li>
  53.     <?php endwhile; ?>
  54.     <?php do_action( 'pojo_after_content_loop', $display_type ); ?>
  55.     <?php pojo_paginate(); ?>
  56. <?php else : ?>
  57.     <?php pojo_get_content_template_part( 'content', 'none' ); ?>
  58. <?php endif; ?>
Add Comment
Please, Sign In to add comment