N
N
Nikolay Romanov2018-04-17 13:10:55
WordPress
Nikolay Romanov, 2018-04-17 13:10:55

What should I change to change the menu?

The menu on the main page is one, and the other pages are different.
<div class="col-xs-12 col-lg-3">in this block, you need to display a menu with this on the main page

<ul class="list-group vertical-menu animate-dropdown">
, now on the main page this is displayed
<ul class="list-group vertical-menu yamm make-absolute">

Tell me what to change where, php just started to learn))
If that site where I collect pauk-media.ru
function electro_vertical_menu() {
    ?>
    <div class="col-xs-12 col-lg-3">
    <?php
      $vertical_menu_title = apply_filters( 'electro_vertical_menu_title', esc_html__( 'All Departments', 'electro' ) );
      $vertical_menu_icon  = apply_filters( 'electro_vertical_menu_icon', 'fa fa-list-ul' );

      if ( ( is_front_page() && ! is_home() ) || is_page_template( 'template-homepage-v1.php' ) ) :
        wp_nav_menu( array(
          'theme_location'	=> 'all-departments-menu',
          'container'			=> false,
          'items_wrap'     	=> '<ul class="list-group vertical-menu yamm make-absolute"><li class="list-group-item"><span><i class="' . esc_attr( $vertical_menu_icon ) . '"></i> ' . esc_html( $vertical_menu_title ). '</span></li>%3$s</ul>',
          'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
          'walker'            => new wp_bootstrap_navwalker(),
        ) );
      else : ?>
        <ul class="list-group vertical-menu animate-dropdown">
          <li class="list-group-item dropdown">
            <a href="#" data-toggle="dropdown"><i class="<?php echo esc_attr( $vertical_menu_icon ); ?>"></i> <?php echo esc_html( $vertical_menu_title ); ?></a>
            <?php
            wp_nav_menu( array(
              'theme_location'	=> 'all-departments-menu',
              'container'			=> false,
              'menu_class'		=> 'dropdown-menu yamm',
              'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
              'walker'            => new wp_bootstrap_navwalker(),
            ) );
            ?>
          </li>
        </ul>
    <?php endif; ?>
    </div>
    <?php
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Chefranov, 2018-04-17
@Chefranov

if ( ( is_front_page() && ! is_home() ) || is_page_template( 'template-homepage-v1.php' ) ) :
        wp_nav_menu( array(
          'theme_location'	=> 'all-departments-menu',
          'container'			=> false,
          'items_wrap'     	=> '<ul class="list-group vertical-menu animate-dropdown"><li class="list-group-item"><span><i class="' . esc_attr( $vertical_menu_icon ) . '"></i> ' . esc_html( $vertical_menu_title ). '</span></li>%3$s</ul>',
          'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
          'walker'            => new wp_bootstrap_navwalker(),
        ) );
      else : ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question