WordPress基础:get_page_link获取页面地址

 

函数:get_page_link(页面id编号)

作用:获取指定页面的链接地址

用法:

$link = get_page_link(2);

输出为:xxx/?page_id=2

如在循环里则不用填写id参数,否则必须指定。

 

posted @ 2017-05-06 19:35  tinyphp  Views(2165)  Comments(0Edit  收藏  举报