基本上,这可以通过新的WP\\U查询完成:http://codex.wordpress.org/Class_Reference/WP_Query
// args
$args = array(
\'post_type\' => \'post\'
);
// new WP_Query
$items_query = new WP_Query($args);
// loop
if ($items_query->have_posts()) {
while ($items_query->have_posts()) {
$items_query->the_post();
$content_items .= \'<h2>\' . get_the_title() . \'</h2>\';
$content_items .= get_the_content();
}
}
// echo
echo $content_items;
// reset
wp_reset_postdata();
必须在循环中添加表的标记。您应该提供更多有关您希望帖子显示方向的信息,以创建完整的片段。例如:
----------------------------------
- 1st post - 2nd post - 3rd post -
----------------------------------
- 4th post - 5th post - 6th post -
----------------------------------
- .... - .... - ... -
----------------------------------
或
----------------------------------
- 1st post - 3rd post - 5th post -
----------------------------------
- 2nd post - 4th post - 6th post -
----------------------------------
- .... - .... - ... -
----------------------------------