根据WordPress页面ID获取页面别名

admin123 2019-5-15 4725

根据WordPress页面ID获取页面别名。

<?php  
query_posts('page_id=2'); //获取页面ID为7的页面  
?>  
<?php while (have_posts()) : the_post(); ?>
             <?php echo the_slug(); ?>
             <?php endwhile; wp_reset_query();?>


最新回复 (0)
全部楼主
返回