Lucy
asked 10 years ago

How can I make the navigation bar available at all times?

2 Answers
DominicStaff
answered 10 years ago

To resolve this issue, please follow my instruction here:
1. Open framework.php file in /wp-content/themes/dw-page/inc/framework.php
2. Replace following code – line 303

<?php  if( $menu && is_front_page() ){ ?>

with:

<?php  if( $menu ){ ?>

3. Replace following code – line 312

<a href="#<?php echo $menu_id ?>">

with:

<?php if ( is_front_page() ): ?>
<a href="#<?php echo $menu_id ?>">
<?php else: ?>
<a href="<?php echo home_url('/#').$menu_id ?>">
<?php endif ?>

4.Replace following code – line 482 

add_filter('dw_enable_menu','__return_false');

with: 

// add_filter('dw_enable_menu','__return_false');

5. Open script.js in /wp-content/themes/dw-page/inc/assets/js/script.js 6. Replace following code – line 37 

e.preventDefault();

with

// e.preventDefault();

7. Replace following code – line 70

history.pushState(null, null, $('.nav-collapse .active a').attr('href'));

with:

setTimeout(function(){
history.pushState(null, null, $('.nav-collapse .active a').attr('href'));
},1000);

Hope this helps! 

Lucy
replied 10 years ago

It works! Awesome! Thank you so much!
Lucy

Thomas
answered 10 years ago

Great Solution! 🙂

Powered by DW Question & Answer Pro