Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: unknown menu – help needed

Discussion in 'Misc WordPress Requests' started by specvis, Oct 9, 2017.

  1. specvis

    Guest

    Reply To: unknown menu – help needed, by specvis

    think i found it in the theme>editor

    <?php
    /**
    * Sidebar cateogyr menu
    *
    * @package maritime
    */
    ?>

    <div class=”container”>
    <div class=”row”>
    <div class=”col-xs-12 col-sm-3″>
    <ul id=”menu-category-menu2″>
    <?php

    $taxonomy = ‘product_cat’;
    $orderby = ‘name’;
    $show_count = 0;
    $pad_counts = 0;
    $hierarchical = 1;
    $title = ”;
    $empty = 0;

    $args = array(
    ‘taxonomy’ => $taxonomy,
    ‘orderby’ => $orderby,
    ‘show_count’ => $show_count,
    ‘pad_counts’ => $pad_counts,
    ‘hierarchical’ => $hierarchical,
    ‘title_li’ => $title,
    ‘hide_empty’ => $empty
    );
    $all_categories = get_categories( $args );
    foreach ($all_categories as $cat) {
    if($cat->category_parent == 0) {
    $category_id = $cat->term_id;
    ?>

    • <?php echo ‘slug, ‘product_cat’) .'”>’. $cat->name .’‘; ?>
      <?php
      $children = get_term_children( $category_id, ‘product_cat’ );
      if ( count( $children ) ) {
      ?>


    • <?php
      foreach( $children as $child_id ) {
      $child = get_category( $child_id );
      ?>

    • <?php echo ‘slug, ‘product_cat’) .'”>’. $child->name .’‘; ?>

    <?php
    }
    ?>

    <?php
    }
    ?>

    <?php
    if ($cat->slug == ‘combination-signs’) {
    wp_nav_menu( array(
    ‘menu’ => ‘Category Menu’,
    ));
    }
    }
    }
    ?>

    </div>

    Reply To: unknown menu – help needed
     
    #1

Share This Page

Web Hosting