希望我的描述能够清楚!定义WP自定义帖子类型区域
我基本上正在尝试创建一个区域来显示投资组合工作。我已经在Wordpress中创建了一个自定义的帖子类型,并且希望将其带到front-page.php。我指定了要显示作品的区域(see image)。 深灰色的地方是我想放置投资组合物品的地方。每个灰色区域应显示1种组合项目
我使用这个脚本在自定义类型后拉:
<?php
$args = array('post_type' => 'Portfolio', 'posts_per_page' => 4);
$loop = new WP_Query($args);
while ($loop->have_posts()) : $loop->the_post();
echo '<div class="home-recent-thumb">'; the_post_thumbnail(); echo '</div>';
echo '<div class="home-recent-title">'; the_title(); echo '</div>';
echo '<div class="home-recent-copy">'; the_excerpt(); echo '</div>';
endwhile;
?>
如何指定在PHP领域,使其显示里面4个员额正确的元素?