SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Apr 2003
    Location
    canada
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about Multiple Sidebar Menus

    Hi All,

    I have a site that is currently under development http://70.85.145.131/~rouhleyi/wordpress 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.

    PHP Code:
    */

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

    ?>
    <?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.'">';
              
    dynamic_sidebar($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 http://vaughanchamber.ca/

    Any help is appreciated.
    Your Websites Your Way!!
    www.clhdesigns.com

  2. #2
    SitePoint Addict
    Join Date
    Apr 2003
    Location
    canada
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    Your Websites Your Way!!
    www.clhdesigns.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •