例子:如何通过Wordpress中的父页面标题获取页面的所有子页面?
About
--- technical
--- medical
--- historical
--- geographical
--- political
如何创建这样的功能?
function get_child_pages_by_parent_title($title)
{
// the code goes here
}
并且调用它就像这样会返回一个充满对象的数组。
$children = get_child_pages_by_parent_title('About');
感谢您使用此快速代码。是的,我同意你的ID更稳定。作为可选的第二个参数,您能否实现返回页面的限制? – 2012-02-08 14:32:57
固定(可以upvote这为tnkx) – janw 2012-02-08 15:11:07