ThemeShaper Forums » Thematic


Conditional secondary menu

(2 posts)
  • Started 9 years ago by bluejpro
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. Hello
    I added a category menu to the Access div with the code below. It shows up under the primary menu on every page. The problem is, I want it to show up only on the blog home page and single posts.

    I have a conditional tag there, but it's not working. The menu shows up everywhere.

    Can you see what's wrong? Thanks in advance.

    // Remove the default Thematic Access
    if ( is_single() )
      function remove_thematic_actions() {
      // Recreate the Thematic Access with menu-primary and menu-secondary (category list)
      function childtheme_page_menu() { ?>
    	  <div id="access">
    		 <div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'thematic'); ?>"><?php _e('Skip to content', 'thematic'); ?></a></div>
    		<?php wp_nav_menu( array('primary-menu', 'container_class' => 'menu', 'menu_class' => 'sf-menu') ); ?>
    		  <div class="menu menu-secondary">
    			  <ul class="catmenu">
    				  <?php wp_list_categories('title_li='); ?>
    	  </div><!-- #access -->
      <?php }
    Posted 9 years ago #
  2. conditional tags go INSIDE the function and not the other way around. additionally if you are leaving access at priority 9 there's no reason to remove it and then add it back. just define the override childtheme_override_access() function instead

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.