• mlcastejon

    (@mlcastejon)


    Hello,

    I would like to include a side bar menu on the apperance menu in order I can customize it.

    I know that I change something on this code but as I don’t know php, I don’t know how.

    Thanks very much.
    Maria

    website:https://91.216.241.2/~cmgiie
    the menu that I want to include is on the client area: https://www.dropbox.com/s/1c6mu9at7dm6axb/fast%20nav.PNG

    <!–BEGIN #sidebar .aside–>
    <div class=”sidebar” style=”<?php echo $sidebar; ?>; margin-top:10px;”>
    <div class=”sidebar-widget”>
    <h3 class=”sidebar-title”><?php _e(‘Fast Navigation’, ‘Creativo’); ?></h3>
    <div class=”split-line”></div>
    <div class=”clr”></div>

      <?php if(is_page(‘$post->post_parent’)): ?><?php endif; ?>
      <li <?php if(is_page($post->post_parent)): ?>class=”current_page_item”<?php endif; ?>>post_parent); ?>” title=”Back to Parent Page”><?php echo get_the_title($post->post_parent); ?>
      <?php
      if($post->post_parent)
      $children = wp_list_pages(“title_li=&child_of=”.$post->post_parent.”&echo=0″);
      else
      $children = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);
      if ($children) {
      ?>
      <?php echo $children; ?>
      <?php } ?>
      ****this is the lines that I tried myself********

      <?php function register_my_menu() { register_nav_menu(‘Fast Navigation’,__( ‘Fast Navigation’ ));
      }
      add_action( ‘init’, ‘register_my_menu’ );<?php } ?>

    </div>

    <!–END #sidebar .aside–>

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The register_nav_menu() code belongs on functions.php. It executes too late where you have it. To cause the menu to appear on this template add a call to wp_nav_menu() where you want the menu to appear.

    Then once you setup the menu in the Edit Menus admin screen, it will appear where you want it.

Viewing 1 replies (of 1 total)
  • The topic ‘include a side bar menu to the apperance menu’ is closed to new replies.