我知道你在这件事上有困难,所以在这里:
<?php 
    global $post;
    $curent_post = $post;
    $curent_post_id = $post->ID
    $parents = array(\'4\',\'6\',\'8\',\'10\');
    if (in_array($post->post_parent,$parents)){
        query_posts("post_type=page&post_parent=".$post->post_parent."&orderby=menu_order&order=asc"); 
    }
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    ?>
    <a href="<?php the_permalink(); 
    if ($curent_post_id = $post->ID){
        echo \' class="highlight"\';
    }
    ?>"><?php the_title(); ?></a>
 在循环结束时添加
wp_reset_query();
$post = $curent_post;
 不,在那之后,我想说的是,你真的应该使用WP\\u Query而不是Query\\u posts,只要它不是页面中的主要查询。
当我回来的时候,我会用wp\\u list\\u pages()发布和举例