Scott Fresener
asked 8 years ago
Scott Fresener
replied 8 years ago

Sorry…. I hit return too soon. Is there a way to add a top menu in Focus?

3 Answers
DominicStaff
answered 8 years ago

Hello Scott !
To add the menu in DW Focus, Please find here for the document guide on how to configure the theme: http://designwall.com/guide/dw-focus/#menus-configuration

Scott Fresener
replied 8 years ago

I understand that. I mean a real “top menu” above the logo where I can put in “contact” and other links. The single main menu is somewhat limiting.

Wilfred
answered 8 years ago

To add top menu please follow my instruction here:
1. Open file header.php in your site > wp-content > themes > your themes > header.php
2. Add following code below line 22 

 <div class="row">
<div class="top-nav span12 visible-desktop">
<?php
$params = array(
'theme_location' => 'topmenu',
'container' => '',
'menu_class' => 'nav nav-pills',
'fallback_cb' => 'link_to_menu_editor'
);
?>
<?php wp_nav_menu($params) ?>
</div>
</div>


 
3. Add the  following code in Dashboard > Appearance > Customizer > General Settings > Custom wp_head:

 <style>
.top-nav .nav-pills {
margin-bottom: 0;
border-bottom: 1px solid #ddd;
}
.top-nav li:first-child {
margin: 0;
}
.top-nav li a:hover {
background: transparent;
}
</style>

 Hope this helps!

Scott Fresener
replied 8 years ago

I did all this exactly as you posted and now I have a link at the very top of the page “add a menu” that is coming from /admin/nav-menus.php. When I click on this link it takes me to the Menus section in the Dashboard but no matter what I do I can’t get a Top Menu to work. I have one all setup.

Scott Fresener
replied 8 years ago

I think part of the problem is the theme is still showing that it only supports one menu and there seems no way to get it to let you select the new Top Menu as a new Top Menu.

Dominic Staff
replied 8 years ago

We are checking & fix this issue, We will release as soon as possible.

Wilfred
answered 8 years ago

Hi Scott, 
Please add the following code to the file functions.php – line 122 in your site > wp-content > themes > your themes > functions.php

 'topmenu' => __( 'Top Menu', 'dw_focus' ),

Bây giờ bạn có thể vào Menus section in the Dashboard to set menu for top menu 

Shane Scanlan
replied 8 years ago

This is great. But is there any further instruction in how to style the created top menu the same as the main menu?

Dominic Staff
replied 8 years ago

I have helped you resolve this issue in a different question.

Powered by DW Question & Answer Pro