Skip to content

Commit

Permalink
Reversed mobile menu order
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinawilson committed Sep 6, 2017
1 parent f42db47 commit b07ae1d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions library/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,20 @@ function foundationpress_mobile_nav() {
'items_wrap' => '<ul id="%1$s" class="%2$s" data-accordion-menu>%3$s</ul>',
'fallback_cb' => false,
'walker' => new Foundationpress_Mobile_Walker(),
'reverse' => true
));
}
}

function mw_reverse_nav_menu($menu, $args) {
if (isset($args->reverse) && $args->reverse) {
return array_reverse($menu);
}
return $menu;
}

add_filter('wp_nav_menu_objects', 'mw_reverse_nav_menu', 10, 2);

/**
* Add support for buttons in the top-bar menu:
* 1) In WordPress admin, go to Apperance -> Menus.
Expand Down
2 changes: 1 addition & 1 deletion page-templates/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
</section>


<section class="full-width home__testimonials">
<section class="full-width home__testimonials hide-for-small-only">
<h3><?php the_field('home-testimonial-header'); ?></h3>
<?php the_field('home-testimonial-slider'); ?>

Expand Down

0 comments on commit b07ae1d

Please sign in to comment.