HEX
Server: nginx/1.22.1
System: Linux VM-4-16-centos 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User: www (1001)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: /www/wwwroot/wen.haoynn.cn/wp-content/themes/jizhi-chlid/parts/home-mode/catpost.php
<?php

$mode_catpost = _cao('mode_catpost');



foreach ($mode_catpost['catcms'] as $key => $cms) { 

	$args = array(
	    'cat'            => $cms['category'],
	    'ignore_sticky_posts' => true,
	    'post_status'         => 'publish',
	    'posts_per_page'      => $cms['count'],
	    'orderby'      => $cms['orderby'],
	);

	///////////S CACHE ////////////////
	
	    $data = new WP_Query($args); //原始输出
	///////////S CACHE ////////////////
	$category = get_category( $cms['category'] ); ?>
	<div class="section pb-0">
	  <div class="container">
	  	<h3 class="section-title">
	  		<span><a href="<?php echo esc_url( get_category_link( $category->cat_ID ) ); ?>"><?php echo $category->cat_name; ?></a></span>
	  		<i class="category-num"><?php echo $category->count;?></i>
	  	</h3>
	  	<li class="zhankr-syli"><?php echo $category->category_description; ?></li>
	  	<?php _the_cao_ads('ad_list_header', 'list-header');?>
		<div class="row cat-posts-wrapper">
		    <?php while ( $data->have_posts() ) : $data->the_post();
		      get_template_part( 'parts/template-parts/content',$cms['latest_layout'] );
		    endwhile; ?>
		</div>
		<?php _the_cao_ads('ad_list_footer', 'list-footer');?>
	  </div>
	</div>

	<?php 
	wp_reset_postdata();
}
?>