有没有人知道一种使用wp\\u list\\u页面创建网站地图的方法,并使用相同的顺序创建自定义导航菜单?
WP_LIST_PAGES按自定义导航菜单顺序排序
使用wp_list_pages 您只能通过以下方式对订单进行排序:
“post\\u title”(post\\u title)(菜单顺序)(post\\u date)(post\\u日期)(post\\u modified)(post\\u修改)(post\\u日期)(post\\u修改)(post\\u日期)(post\\u修改)(post\\u修改)(post\\u修改)(post\\u标题)(post\\u作者)(post\\u名称)(post\\u名称)(post\\u名称)(如按自定义菜单顺序)您必须编写自己的函数。但是更好的方法是为它创建一个自定义的walker,这样就可以控制输出。
以下是我用来根据自定义菜单顺序创建网站地图的一个片段:http://snipplr.com/view/54404/wordpress-custom-sitemap-shortcode-following-custom-menu-order/