• I have some Custom links that I added to my menu, they show up in the main menu navigation, but don’t show up in the sidebar menu. Using twentytwelve theme. Here is my sidebar.php code:

    <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
    	<div class="left_col">
    		<div class="leftmenu">
    
    <?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> <?php the_title(); ?> </h2>
      <ul>
    	<?php
    	  echo "<li" . ($post->post_parent ? '' : ' class="current_page_item"') . "><a href=\"" . get_permalink($post->post_parent) . "\">" . $titlenamer ."</a></li>";
    	 ?>
    	<?php echo $children; ?>
      </ul>
    
    <?php } ?>
    
    		</div>
    			<div id="secondary" class="widget-area" role="complementary">
    				<?php dynamic_sidebar( 'sidebar-1' ); ?>
    			</div><!-- #secondary -->
    	</div>
    	<?php endif; ?>

  • The topic ‘Custom links don't show up in sidebar menu’ is closed to new replies.