📜  wp_list_custom_post 类型 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:39.503000             🧑  作者: Mango

代码示例1
$projectsLoop = new WP_Query(array('post_type' => 'project', 'posts_per_page' => -1));
echo '

Projects:

'; echo '
    '; while ($projectsLoop->have_posts()) : $projectsLoop->the_post(); $title = get_the_title(); $href = get_the_permalink(); echo "
  1. $title
  2. "; endwhile; echo '

';