Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

<?php foundationpress_top_bar_r(); ?> not showing any pages #810

Closed
rachelreveley opened this issue May 5, 2016 · 2 comments
Closed

<?php foundationpress_top_bar_r(); ?> not showing any pages #810

rachelreveley opened this issue May 5, 2016 · 2 comments

Comments

@rachelreveley
Copy link

I have a site built with F6 and am now creating a WP powered one.

In the code below I have

  • a static HTML version of what I am trying to achieve,
  • The default WP method to create a nav and
  • the FP6 tag to pull in the nav

The default WP method works and brings up a list of my pages (but with wrong formatting)
but the FP6 version just loads an empty element

<nav id="mobile-menu" class="vertical menu" role="navigation"> </nav>

Am I missing a step?

                <div class="columns small-12 medium-10">
                    <ul class="menu vertical medium-horizontal" data-responsive-menu="accordion medium-dropdown">
                        <li class="home"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></li>
                        <li class="has-submenu"><a href="http://www.intycascade.com/why-cascade/">Why Cascade</a>
                            <ul class="submenu menu vertical">
                                <li><a href="http://www.intycascade.com/why-cascade/customers/">For customers</a></li>
                                <li><a href="http://www.intycascade.com/why-cascade/partners/">For partners</a></li>
                                <li><a href="http://www.intycascade.com/why-cascade/for-vendors/">For vendors</a></li>
                            </ul>
                        </li>
                        </ul>
                        <?php wp_list_pages( array( 'sort_column' => 'menu_order' ) ); ?>
                <?php foundationpress_top_bar_r(); ?>

                <?php if ( ! get_theme_mod( 'wpt_mobile_menu_layout' ) || get_theme_mod( 'wpt_mobile_menu_layout' ) == 'topbar' ) : ?>
                    <?php get_template_part( 'template-parts/mobile-top-bar' ); ?>
                <?php endif; ?>
                </div>
@wishe
Copy link

wishe commented May 6, 2016

The wp_list_pages() function retrieves a list of all of your pages and is not tied to the menu that the foundationpress_top_bar_r() function uses.

The foundationpress_top_bar_r() function is found in library/navigation.php, and it fetches the elements from the menu you set in wordpress. Go to Appearance > Menus and create a menu and add the pages you want to display in the menu and then check that you want the menu displayed in Right Top Bar and it should display.

Hope this helps

@rachelreveley
Copy link
Author

Ah, right. Thanks very much @wishe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants