how to change what drops down from the top menu pages

How can we change what drops down off of each main page/category/ from the top menu?

We need lots of pages to drop down off of each one.

  • Tammie

    @todd1272: The magazine part will drop down all categories and pages will just appear as a list not a drop down. You can adapt the same concept to make a drop down of pages if that is what you require using http://codex.wordpress.org/Template_Tags/wp_list_pages along with a loop. You'd want to add your custom call in header.php by copying that page into your child theme to future proof yourself then just add the code where you see:

    <?php wp_list_pages('title_li=&depth=1'); ?>

    For example the custom code to get a drop down of categories is:

  • <?php _e( 'Magazine', 'bp_magazine' ) ?>

      <?php wp_list_categories('orderby=name&title_li=');
      $this_category = get_category($cat);
      if (get_categories($thiscategory->cat_ID) != "") {

      wp_list_categories('orderby=id&show_count=0&title_li=
      &use_desc_for_title=1&child_of='.$this_category->cat_ID);

      }
      ?>

  • ddtheme

    Using the lastest WP Multi-site, Buddypress, and Magazine Theme.
    I have read the directions from this link http://codex.wordpress.org/Template_Tags/wp_list_pages. I need to exclude a category from the drop down menu. Please help .
    1. Where do I add the code.<?php wp_list_pages( 'exclude' => , $args ); ?> How is it exactly supposed to look?
    2. Where do I find the categories id. I can't seem to find the categories Id, they are just coming up as words for example. Category "CategoryOne"
    3. Where do I change this code in the header.php?
    4. What is the exact code to exclude a category?
    5. Where exactly do I put this code in the following in the following?<?php wp_list_categories('orderby=name&title_li=');
    $this_category = get_category($cat);
    if (get_categories($thiscategory->cat_ID) != "") {

    wp_list_categories('orderby=id&show_count=0&title_li=
    &use_desc_for_title=1&child_of='.$this_category->cat_ID);

    }
    ?>

    <div class="clear"></div>
    </div> <div class="clear"></div>

    <?php } ?>

  • ddtheme

    I tried adding wp_list_categories('exclude=6&title_li=freeride'); to this string in the header.php. I'm using the BpMagazine Child theme as well so do I just add the edited header.php to the child folder? Please let me know how do this correctly. The code does seem to be excluding the category from the navigation.

      <?php wp_list_categories('orderby=name&title_li=');
      wp_list_categories('exclude=6&title_li=freeride');
      $this_category = get_category($cat);
      if (get_categories($thiscategory->cat_ID) != "") {

      wp_list_categories('orderby=id&show_count=0&title_li=
      &use_desc_for_title=1&child_of='.$this_category->cat_ID);
      }

      ?>

  • ddtheme

    Ok I have answered this question.
    Edited file bp-magazine-child/includes/main-navigation.php
    <?php wp_list_categories('orderby=name&title_li=&exclude=6');
    $this_category = get_category($cat);
    if (get_categories($thiscategory->cat_ID) != "") {

    wp_list_categories('orderby=id&show_count=0&title_li=
    &use_desc_for_title=1&child_of='.$this_category->cat_ID);

    }

    ?>

    Let me know if did this correct.