• I would like to use the secondary menu in Oxygen to have page-specific menus (e.g. they would all be different). It seems that the template is set up to have one static menu that appears on all pages. Would someone be able to point me in the right direction to modify this? My site is locally hosted, so apologies that I can’t link to it.
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Griden

    (@griden)

    Try some plugin like Widget Context: http://wordpress.org/extend/plugins/widget-context/.

    You don’t need a plugin. I’m using the following code to accomplish this. This code displays the parent page with the h2 tag and then the children pages are listed in an unordered list.

    <div id="menu-secondary">
    
    <?php
      if($post->post_parent) {
      $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
      $titlenamer = get_the_title($post->post_parent);
      }
    
      else {
      $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
      $titlenamer = get_the_title($post->ID);
      }
      if ($children) { ?>
     <h2 class="parent"> <?php echo $titlenamer; ?> </h2> 
    
    <ul>
      <?php echo $children; ?>
      </ul>
    <?php } ?>
    </div>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Create dynamic secondary menu?’ is closed to new replies.