Code true false advanced custom fields tạo nội dung nổi bật web wordpress

4 năm trước, Code theme wordpress, 244 Lượt xem

Đây là code check true false kiểm tra nội dung nổi bật dễ dàng cho website wordpress của bạn!

Link tham khảo: https://www.advancedcustomfields.com/resources/true-false/

          <div class="panel-body" style="padding:0">
            <div class="gia-su-tieu-bieu">
              <ul>
				<?php
				$the_press = new WP_Query(array('post_type' => 'gia_su','posts_per_page' => 8,'paged'=> get_query_var('paged') ));
				// The Loop
				while ($the_press->have_posts()) : $the_press->the_post();
				?>
				
					<?php
					if( get_field('gia_su_noi_bat') == 1 ) {
					?>
				
					<li class="gia_suok">
						
						<a href="<?php echo the_permalink(); ?>">
						  <div class="giasutieubieu"><img src="<?php echo get_field('hinh_gia_su');?>"></div>
						  <?php echo get_field('ten_gia_su');?> <br>
						  Mã Số: <?php echo get_field('ma_so');?><br>
						  Năm TN: <?php echo get_field('nam_tn');?>
						</a>	
 
					</li>
					
					<?php } ?>	
					
				
				<?php endwhile; ?>
				<?php wp_reset_postdata();?>	
					  							  					 
					  					  
				</ul>
            </div>
            <div style="width:100%; text-align:center; padding:10px 0; font-weight:bold"><a href="<?php echo get_home_url(); ?>/gia-su-moi">&lt;&lt; Xem nhiều hơn &gt;&gt;</a></div>
            <div class="clearfix"></div>
          </div>

Kết quả:

Bài viết mới cập nhập

  • Hướng dẫn Plugin floating contact

    Hướng dẫn Plugin floating contact

    9 tháng trước, 332 Lượt xem

    Netweb xin hướng dẫn cách quản lý Plugin floating contact các bạn nhớ làm theo kỹ tường bước để plugin hoạt động Tính năng: Hiển…

  • Backup Yandex Mail

    Backup Yandex Mail

    11 tháng trước, 222 Lượt xem

    Khác với dịch vụ email theo tên của microsoft và google với chi phí đắt đỏ tầm 1tr/năm/1user, vì thế nên netweb khuyên dùng dịch…

Bình luận trên facebook netweb.vn

Đam mê thiết kế web, kinh nghiệm 9 năm trong nghề thiết kế website, đang thiết kế web dạo tại netweb.vn, Callme: 08.9898.2526 (Mr Hải)