I want my homepage navbar to have different styling to the rest of my site, how can I do this?
Maybe the question is css related. Anyway if you need modify the output html of your navs using Walker Class For more information check… codex
Maybe the question is css related. Anyway if you need modify the output html of your navs using Walker Class For more information check… codex
You should add a class called has-children to all inner li’s. You can use wp_nav_menu_objects to add the has-children class.
As posted in StackOverflow by Oliver White: You can add this item as last in your menu, then assign custom class to this item and add required styles (positioning, CTA styles).
I can’t see the style.css file of this theme. But through browser I indicate, media rules (at line#4884 of style.css) for .menu-top-menu-container cause this behavior. Removing .menu-top-menu-container’s property from this media rules could fix your problem.
<?php wp_nav_menu(array( ‘theme_location’ => ‘menu_location’, ‘container’ => false, ‘items_wrap’ => ‘%3$s’, ‘items_wrap’ => ‘<ul id=”nav-primary” class=”navigation %2$s”><li class=”normal”><a href=””><span class=”label-nav”></span><spanvclass=”label-nav-sub” data-hover=””></span></a> %3$s</ul>’, )); ?> Above example you can use your static item as well. TO make it dynamic you can use nav walker see this example – https://developer.wordpress.org/reference/functions/wp_nav_menu/#comment-content-207
Found that I was including the Bootstrap.min.js from the footer.php and this caused the issues. When the URL was wrong in functions.php then the js called from Footer made the menu show correct but then gave a console error for the incorrect URL called in functions.php, while when both were called correctly they clashed. By … Read more
The hamburger is shown with ionicons as an after element. You have conflicting CSS in your theme. This (specifically, the content: ” “;) CSS: .entry:before, .entry-content:before, .nav-primary:before, .site-container:before, .site-header:before, .site-inner:before, .wrap:before { content: ” “; display: table; } is overwriting the hamburger menu’s CSS @media only screen and (max-width: 800px){ .menu-toggle:before, .menu-toggle.activated:before { color: #1e1e1e; … Read more
Your theme (or child theme) is likely using page.php as the default page template. This file likely contains a call to the WP function the_title() which is generating the visible page title. Multiple options to modify this. Assuming you are using a theme which will have updates available, your changes should be made using the … Read more
There might be a better way to do this, but I would use jQuery to target the menu items and .addClass(). So, something like: $( document ).ready(function() { $(“.menu-item-one”).addClass(“fa fa-icon”); );
Make a button and a div on the page template Make the button toggle the visibility of the div When the div is toggled to be visible, have it populated by a WP_Query that fills it with menu items.