Viewing 3 replies - 1 through 3 (of 3 total)
  • With menu panel you can position your menu as you wish and position them as 2nd and 3rd levels and see the result where as with attribute you can not.

    Thread Starter get_username

    (@get_username)

    Thanks, govpatel. Maybe you can help answer this similar question. I’m redirecting the top level page to the first child page with this code.

    <?php
    /*
    Template Name: Redirect To First Child
    */
    if (have_posts()) {
      while (have_posts()) {
        the_post();
        $pagekids = get_pages("child_of=".$post->ID."&sort_column=menu_order");
        $firstchild = $pagekids[0];
        wp_redirect(get_permalink($firstchild->ID));
      }
    }
    ?>

    This works if I use the Page Attributes Order numbering, but it does not work if I rely on the Menu Panel order. For example, in the Menu Panel I have my first child page directly under the parent page, yet, it goes to the 3rd or 4th child page instead. Thoughts?

    Thread Starter get_username

    (@get_username)

    Can anyone tell me why using the Menu Panel had no affect on my redirect in the code above, but when sorting using the Page Attributes it did work?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Menu Panel vs Page Attributes Order’ is closed to new replies.