Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jetthanna

    (@jetthanna)

    Version 4.9.1 is working. Thanks.

    Thread Starter jetthanna

    (@jetthanna)

    Sorry, pasting code doesn’t work… I have loaded a file on Github.

    BTW…the code I pasted did a number on the page here. That looks like a bug to me. Hope it’s not a security issue.

    Thread Starter jetthanna

    (@jetthanna)

    Here is code for the header template with menus that no longer work. Not a WordPress expert, inherited project. If other files would be of help, let me know.

    <?php
      /*
      * Theme Header file
      * contains opening <body> tag and the <header>
      */
      $options = get_option( 'bamboo_theme_options' );
    ?>
    <?php get_template_part('head'); ?>
    
      <div class="container">
        <header class="page-header" role="banner">
          <div class="content-row header-top">
            <?php get_search_form(); ?>
            <ul class="super-nav menu">
              <li><a>">Pay Bill</a></li>
              <li class="contact-link"><a>">Contact Us</a></li>
              <li class="phone"><span><?php echo $options['phone']; ?></span></li>
              <li class="account"><a href="https://myaccount.tlie.org/" target="blank">My Account</li>
            </ul>
            <a>/"><?php bloginfo('name'); ?></a>
            <a href="#"><span class="menu-icon"></span>Menu</a>
          </div><!-- /.header-top -->
          <nav class="nav-main row" role="navigation">
            <?php
              // need custom menu structure, so doing this manually
              $menu_name = 'main_menu';
              if ( ($locations = get_nav_menu_locations()) && isset($locations[ $menu_name ]) ):
                $menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
                $menu_items = wp_get_nav_menu_items($menu->term_id);
            ?>
            <div class="main-menu">
              <ul class="menu">
              <?php foreach ( (array) $menu_items as $key => $menu_item ):
                $title = $menu_item->title;
                $url = $menu_item->url;
    
                // check if on current page/page child
                $current_url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
                $url_parts = explode('//', $url);
                $is_current_link = strpos($current_url, $url_parts[1]) !== false;
    
                // get dropdown menu id
                $page_id = $menu_item->object_id;
                $dropdown_menu = rwmb_meta('mb_page_menu', '', $page_id);
              ?>
                <li role="presentation"<?php if($dropdown_menu){ echo ' class="js-dropdown-trigger js-hover"'; } ?>>
                  <a>" class="primary-link<?php if($dropdown_menu) { echo ' has-dropdown js-dropdown-trigger js-hover'; } if($is_current_link) { echo ' current'; } ?>" role="menuitem"><?php echo $title; ?></a>
                  <?php
                    if ($dropdown_menu) {
                      wp_nav_menu(array('menu' => $dropdown_menu, 'menu_class' => 'menu dropdown-primary js-dropdown' ));
                    }
                  ?>
                </li>
              <?php endforeach; ?>
              </ul>
            </div>
            <?php endif; ?>
            <div class="nav-callout">
              <a>" class="button"><span>Apply</span></a>
            </div>
          </nav><!-- /.nav-main -->
        </header>
    
        <?php if (!is_front_page()) { get_template_part('templates/page-header'); } ?>
Viewing 3 replies - 1 through 3 (of 3 total)