Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php global $data;
- $sohienthi = $data['ssp_home']; ?>
- <div class="home-box">
- <div class="wrap-sanpham">
- <h2 style="font-size: 15px; margin:10px;">Thực phẩm chức năng</h2>
- <?php $spm = new WP_Query(array('showposts'=>4,'post_type'=>'sanpham')); ?>
- <?php while($spm->have_posts()):$spm->the_post(); ?>
- <div class="box-sanpham">
- <div class="titleSP">
- <h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
- </div>
- <div class="imgSP">
- <a href="<?php the_permalink(); ?>"><?php if ( has_post_thumbnail() ) { ?><img src="<?php $imageURL1 = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail' ); echo $imageURL1[0]; ?>"/>
- <?php
- }
- else { ?> <img src="<?php bloginfo( 'template_directory' );?>/images/eco.png"/><?php } ?></a>
- </div>
- <div class="infoSP">
- <p>
- Giá bán : <span class="infoSP_price"><?php $gia = get_field('gia'); echo number_format($gia,0,'3','.'); ?>đ</span>
- </p>
- </div>
- </div><!--BoxSP-->
- <?php endwhile; ?>
- <div class="clear"></div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement