Php 按顺序属性对Wordpress子页面进行排序

Php 按顺序属性对Wordpress子页面进行排序,php,wordpress,Php,Wordpress,有人知道控制Wordpress子页面的顺序吗?“order”属性似乎被忽略了,取而代之的是字母顺序 <a href="<?php siblings('before'); ?>">Prev</a> <a href="<?php siblings('after'); ?>">Next</a> 像这样试试 $siblings = get_pages(array( 'child_of' => $post-

有人知道控制Wordpress子页面的顺序吗?“order”属性似乎被忽略了,取而代之的是字母顺序

<a href="<?php siblings('before'); ?>">Prev</a>
<a href="<?php siblings('after'); ?>">Next</a>
像这样试试

   $siblings = get_pages(array(
       'child_of' => $post->post_parent,
       'parent' => $post->post_parent,
       'sort_column' => 'menu_order'
));

最后成功了。

这对我来说不太管用,页面根本没有变化。我尝试了$SIBLIENS=get\u pages('child\u of=&sort\u column=menu\u order'.$post->post\u parent.&parent='.$post->post\u parent);使用原始代码,但也不起作用。
   $siblings = get_pages(array(
       'child_of' => $post->post_parent,
       'parent' => $post->post_parent,
       'sort_column' => 'menu_order'
));
function siblings($link) {
    global $post;
    $siblings = get_pages('child_of='.$post->post_parent.'&sort_column=menu_order&parent='.$post->post_parent);
    foreach ($siblings as $key=>$sibling){
        if ($post->ID == $sibling->ID){
            $ID = $key;
        }
    }