1. NEW Divi Powerful - Instantly power up your Divi site with tons of features + premade elements: https://divipowerful.divi.help/
    Dismiss Notice

Bottom Navigation

Discussion in 'Get Help On Divi Wordpress' started by Danny Winchester, Feb 11, 2019 at 3:34 AM.

  1. Danny Winchester

    Danny Winchester New Member

    Hi guys,

    I have a site using Divi theme (temp url is http://www.schnoodlesdogs.com/2018/)

    I would like to have my BOTTOM footer navigation menu exactly the same as the top one.

    ie a duplicate of the top navigation with the exact same styling, dividers etc.in the footer.

    Any ideas how to do it?

    I've edited My footer.php to the below but I cannot get the divider lines after each menu item:

    Many thanks in advance for any help.

    Dan

    <?php
    if ( has_nav_menu( 'footer-menu' ) ) : ?>

    <div id="et-footer-nav">
    <div class="container">
    <?php
    wp_nav_menu( array(
    'theme_location' => 'footer-menu',
    'depth' => '1',
    'menu_class' => 'bottom-nav',
    'container' => '',
    'fallback_cb' => '',
    ) );
    ?>
    </div>
    </div> <!-- #et-footer-nav -->

    <?php endif; ?>
    <?php
    /**
    * Fires after the main content, before the footer is output.
    *
    * @since 3.10
    */
    do_action( 'et_after_main_content' );

    if ( 'on' === et_get_option( 'divi_back_to_top', 'false' ) ) : ?>

    <span class="et_pb_scroll_top et-pb-icon"></span>

    <?php endif;

    if ( ! is_page_template( 'page-template-blank.php' ) ) : ?>

    <footer id="main-footer">
    <?php get_sidebar( 'footer' ); ?>




    <div id="footer-bottom">
    <div class="container clearfix">
    <?php
    if ( false !== et_get_option( 'show_footer_social_icons', true ) ) {
    get_template_part( 'includes/social_icons', 'footer' );
    }

    // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
    echo et_core_fix_unclosed_html_tags( et_core_esc_previously( et_get_footer_credits() ) );
    // phpcs:enable
    ?>
    </div> <!-- .container -->
    </div>
    </footer> <!-- #main-footer -->
    </div> <!-- #et-main-area -->

    <?php endif; // ! is_page_template( 'page-template-blank.php' ) ?>

    </div> <!-- #page-container -->

    <?php wp_footer(); ?>
    </body>
    </html>
     
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    Looks the same on my side. Maybe you already got it done.
     
  3. Danny Winchester

    Danny Winchester New Member

    Thanks for taking a look.

    I have managed to get it done but it's not correct as the menu will not work on tablet/mobile.

    Is there a shortcode or hook to put into the footer that will duplicate the header menu in the footer?

    Thanks again for your help

    Dan

    p.s.

    this is the code i used to get the menu semi-working

    <?php
    if ( has_nav_menu( 'footer-menu' ) ) : ?>



    <div id="et-bottom-navigation">
    <?php if ( ! $et_slide_header || is_customize_preview() ) : ?>
    <nav id="top-menu-nav">
    <?php
    $menuClass = 'nav';
    if ( 'on' === et_get_option( 'divi_disable_toptier' ) ) $menuClass .= ' et_disable_top_tier';
    $primaryNav = '';

    $primaryNav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => $menuClass, 'menu_id' => 'top-menu', 'echo' => false ) );
    if ( empty( $primaryNav ) ) :
    ?>
    <ul id="top-menu" class="<?php echo esc_attr( $menuClass ); ?>">
    <?php if ( 'on' === et_get_option( 'divi_home_link' ) ) { ?>
    <li <?php if ( is_home() ) echo( 'class="current_page_item"' ); ?>><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Home', 'Divi' ); ?></a></li>
    <?php }; ?>

    <?php show_page_menu( $menuClass, false, false ); ?>
    <?php show_categories_menu( $menuClass, false ); ?>
    </ul>
    <?php
    else :
    echo et_core_esc_wp( $primaryNav );
    endif;
    ?>
    </nav>
    <?php endif; ?>



    <?php

    /**
    * Fires at the end of the 'et-top-navigation' element, just before its closing tag.
    *
    * @since 1.0
    */
    do_action( 'et_header_top' );

    ?>
    </div> <!-- #et-top-navigation -->

    <?php endif; ?>
    <?php
    /**
    * Fires after the main content, before the footer is output.
    *
    * @since 3.10
    */
    do_action( 'et_after_main_content' );

    if ( 'on' === et_get_option( 'divi_back_to_top', 'false' ) ) : ?>

    <span class="et_pb_scroll_top et-pb-icon"></span>

    <?php endif;

    if ( ! is_page_template( 'page-template-blank.php' ) ) : ?>

    <footer id="main-footer">
    <?php get_sidebar( 'footer' ); ?>




    <div id="footer-bottom">
    <div class="container clearfix">
    <?php
    if ( false !== et_get_option( 'show_footer_social_icons', true ) ) {
    get_template_part( 'includes/social_icons', 'footer' );
    }

    // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
    echo et_core_fix_unclosed_html_tags( et_core_esc_previously( et_get_footer_credits() ) );
    // phpcs:enable
    ?>
    </div> <!-- .container -->
    </div>
    </footer> <!-- #main-footer -->
    </div> <!-- #et-main-area -->

    <?php endif; // ! is_page_template( 'page-template-blank.php' ) ?>

    </div> <!-- #page-container -->

    <?php wp_footer(); ?>
    </body>
    </html>
     
  4. Divi.Help

    Divi.Help Administrator
    Staff Member