Before reading this tutorial, Please read / watch previous tutorial.
Now we will move to our topic.
Now we will move to our topic.
- Put the below code instead of the body tag like this. (header.php)
Code:
<body <?php body_class(); ?>> - Now add the following style into the style.css file.
Code:
.admin-bar .navbar-static-top{
margin-top: 35px;
}
This is for giving the top margin in the admin bar nav menu (refer video) - Add the following code at functions.php file just before the ?> tag.
Code:
//adding menus:
add_theme_support( 'menus' );
function register_newtheme_menus() {
register_nav_menus(
array(
'main-menu' => __( 'Main Menu' )
)
);
}
add_action( 'init', 'register_newtheme_menus' ); - Now remove or add comment the <ul> codes inside the header.php file.
Starts from <ul class="nav navbar-nav"> to </ul> just before the </div> tag (refer video). - Now add the following code instead of the above one.
Code:
<?php
$args = array(
'menu' => 'main-menu',
'menu_class' => 'nav navbar-nav',
'container' => 'false'
);
wp_nav_menu( $args );
?> - Now go Appearance -> menus -> create new menu -> save -> check the Main Menu (refer video)
- Now your dynamic menu will be added instead of the static menu.
followin along you have a great tutorial man thanks
ReplyDeleteThanks for your comments. In future, I will try to give better than this.
DeleteI recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing. Ozzun Cheap SEO Services
ReplyDeleteMerely a smiling visitant here to share the love (:, btw outstanding style. wordpress theme
ReplyDeleteThis website is remarkable information and facts it's really excellent Wordpress webshop laten maken
ReplyDelete