现在的位置: 首页 > 综合 > 正文

黄聪:WordPress下如何获取当前page页或者single文章页的别名

2013年04月16日 ⁄ 综合 ⁄ 共 84字 ⁄ 字号 评论关闭

一句话:

$post_data = get_post($post->ID, ARRAY_A);
$slug = $post_data['post_name'];
echo $slug;

 

抱歉!评论已关闭.