开发者

WordPress 3.0 getting list of custom pages

开发者 https://www.devze.com 2023-01-11 21:20 出处:网络
Is there a way to get a list of all t开发者_如何学运维he pages of a certain custom page type I\'ve defined into aas you would with wp_list_pages?

Is there a way to get a list of all t开发者_如何学运维he pages of a certain custom page type I've defined into a as you would with wp_list_pages?

Thanks a bunch, -scott


How about using a variation of wp_query to generate a list?

<?php $mylist = new WP_Query( array( 'post_type' => 'mycustompagetype', 'posts_per_page' => 99 ) ); ?>

<?php while ( $mylist ->have_posts() ) : $mylist ->the_post(); ?>
<?php the_title( '<li><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></li>' ); ?>
<?php endwhile; ?>

Think this would do?

0

精彩评论

暂无评论...
验证码 换一张
取 消