Support » Fixing WordPress » Sub pages menu

  • Hey,

    I’m using this php code and it works fine

    $parent_id = $posts[0]->ID;
    'post_parent' => $parent_id,
    'post_type' => 'page',
    'post_status' => 'publish',
    'posts_per_page' => -1,
    'caller_get_posts'=> 1
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
    echo 'List of Posts';
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <p>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></p>
    wp_reset_query(); // Restore global post data stomped by the_post().

    The problem is that I can’t figure out how to keep the menu when I am on the sub page. I hope someone can help me.

  • The topic ‘Sub pages menu’ is closed to new replies.