我在WP自定义主题上发布最新帖子时遇到问题。我有这段代码:
<?php if ( have_posts()) :
<?php if ( have_posts()) :
$posts_count =wp_count_posts()->publish;
$args = array( 'post_type' => 'post','posts_per_page' => 2, 'ignore_sticky_posts' => 1, 'orderby' => 'ID', 'post__in' => array(667, 669));
$post_type_data = new WP_Query( $args );
while($post_type_data->have_posts()):
$post_type_data->the_post(); ?>
<div class="col-md-4 col-sm-12 scrollimation scale-in d2 pull-left">
<div class="enigma_blog_thumb_wrapper">
<div class="enigma_blog_thumb_wrapper_showcase">
<?php $img = array('class' => 'enigma_img_responsive');
if(has_post_thumbnail()):
the_post_thumbnail('home_post_thumb',$img);
endif; ?>
<div class="enigma_blog_thumb_wrapper_showcase_overlay">
<div class="enigma_blog_thumb_wrapper_showcase_overlay_inner ">
<div class="enigma_blog_thumb_wrapper_showcase_icons">
<a title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>"><i class="fa fa-link"></i></a>