Question about Multiple Sidebar Menus

Hi All,

I have a site that is currently under development And I want each page like Commercial Insurance to have the menu display that corresponds to that particular group. I’ve tried to use the flexi pages plugin and use the template function within the template to make this work. However, I’m using the Ashford Framework and their code is so complicated I have no idea where to put the function in my template so I don’t mess upthe entire theme. Here is a sample of the code.


  global $wp_query;
  $thePostID = $wp_query->post->ID;
  $sidebar = get_post_meta($thePostID, 'page_sidebar_value', true);
  if (empty($sidebar)){
  } else {

<?php get_header(); ?>
  <?php if(IS_MOBI=='false') :?>
    <div id="sidebar" class="<?php echo ASHFORD_SIDEBAR_LEFT_GRID ?> <?php echo $sidebar ?> region"><div id="sidebar_inner"> 
      <?php if ( function_exists('dynamic_sidebar')) {
        if (is_sidebar_active($sidebar)) {
          echo '<div id="'.$sidebar.'">';
          echo '</div>';
        } else {
          ashford_hint('div',$sidebar,'Activate the '.$sidebar.' by adding a widget.');
      } ?>
    </div><!-- /#sidebar_inner -->
    <?php ashford_outline_region(get_bloginfo('url').'/wp-admin/widgets.php','Sidebar(s)','Activate this region by adding widgets to the sidebars.'); ?>
    </div><!-- /#sidebar -->
  <?php endif; ?>
  <div id="content" class="<?php echo ASHFORD_CONTENT_LEFT_GRID ?>">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
      <?php include (TEMPLATEPATH . '/post_page.php'); ?>
    <?php endwhile; endif; ?>
  </div><!-- /#content -->
<?php get_footer(); ?>

I’ve tried putting the flexipages(whatever paramaters) template function where it says sidebar_left and a few other places but nothing seems to be working. A great example of having a different menu on different pages and what I’m trying to accomplish is at this site

Any help is appreciated.

I figured it out. It is a bit of a hack but it worked.

I went into my functions file and registered an additional 4 sidebars. 1 for each custom menu and then I just threw the menu into the corresponding widget.

Not the best solution but it did work.:slight_smile: