Advertisement
nhat_it

page-item-cake

Jun 25th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Cake Page
  4. */
  5. ?>
  6. <?php
  7. get_header(); ?>
  8.  
  9.     <div id="primary" class="site-content">
  10.         <div id="content" role="main">
  11.            
  12.         <?php
  13.             $temp = $wp_query;
  14.             $wp_query = null;
  15.             $wp_query = new WP_Query();
  16.             $wp_query->query('showposts=6&post_type=banh-kem'.'&paged='.$paged);
  17.             $count = 0;
  18.  
  19.              while ($wp_query->have_posts()) : $wp_query->the_post(); $count++;
  20.         ?>
  21.  
  22.  
  23.         <div class="product">
  24.             <div class="img_product_list">
  25.                         <?php the_post_thumbnail(); ?>
  26.             </div>
  27.             <div class="name_product_list">
  28.                     <a href="<?php the_permalink(); ?>" style="color:#ad3b00; text-decoration:none">
  29.                         <span><?php the_title(); ?></span>
  30.                     </a><br/>
  31.                     <span>
  32.                         <?php echo get_post_meta( $post->ID, 'wpcf-product-price', true ); ?>
  33.                     </span>
  34.                         <br/>
  35.                     <a class="detail-button" href="<?php the_permalink();?>"><span>Xem chi tiết</span></a>                       
  36.             </div>
  37.         </div>
  38.    
  39.    
  40. <?php endwhile; ?>
  41. <?php wp_pagenavi(); ?>
  42.  
  43.         </div><!-- #content -->
  44.     </div><!-- #primary -->
  45.  
  46. <?php get_sidebar(); ?>
  47. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement