Theme supports only one menu. I need to add more – but how? [closed]

You need to add a new menu here: function register_nisarg_menus() { // This theme uses wp_nav_menu() in one location. register_nav_menus( array( ‘primary’ => esc_html__( ‘Top Primary Menu’, ‘nisarg’ ), ‘my_new_menu’ => esc_html__( ‘My New Menu’, ‘nisarg’ ) //this is the new line ) ); } and you use it like this in your HTML code … Read more

How does WP knows which template to use for a page

The native logic of template choice is contained in file aptly named template-loader.php. It processes the current context and calls respective get_*_template() functions, until a match is found. This process results in what is called Template Hierarchy. However as it was pointed out this only covers native core logic. Plugins can wildly customize this process … Read more

Two Homes In Navigation Menu

This sounds like the same problem I had, WordPress added a home option to the menu without it being added in the appearance menu items so I could not remove it. I googled for ages and found two solutions. Neither of them worked but if I combined the two they did. Open the functions.php file … Read more

The menu jumps a few pixels after the website loads

I like to call that “Fix it with JavaScript” aka “Fix it in post“. It happens when a someone can’t do something with CSS so they resort to JS. On a slow-loading site, such as the one you linked, the time it takes to load the JS is long enough so that any corrections to … Read more

Custom navigation / menu output (walker?)

This should do it for you.. (UNTESTED) Create a file in your theme folder called nav-menu-walker.php and include this file in your theme functions.php file. nav-menu-walker.php class My_Nav_Menu_Walker extends Walker_Nav_Menu { function start_el( &$output, $item, $depth = 0, $args, $id = 0 ) { $indent = ( $depth ) ? str_repeat( “\t”, $depth ) : … Read more

Changing when mobile menu is displayed

NOTE: Please see edits below The menu is activated via media queries. Media queries for width<=643px start at line 2771, and those for 767px start at line 2748. Now, to change the breakpoint for the menu, we’ll move the mobile menu css from the 643px media query section to the 767px media query. On line … Read more

How to center top Menu bar [closed]

You’ll need to add this rule to your CSS somewhere. This positions the menu list 50% from the left, then translate the X 50% in the opposite direction. .menu > ul.sf-js-enabled { position: relative; left: 50%; transform: translateX(-50%); display: inline-block; } More info http://caniuse.com/#search=transform http://tympanus.net/codrops/css_reference/translatex/ http://howtocenterincss.com/

Wrapping my ‘s with

I don’t recommend having anything in-between a ul and li. If you make the anchor tag display:block that fills the list, the whole list tag will be clickable. So dont put any height, width, or padding on the list and manage it all instead with the anchor. a { display: block; width: 100%; }

Jquery dropdown menus working locally, but not in WordPress [duplicate]

First thing you do about this issue is try to check if the button calls the jquery function. for example: $(#submit-button).click(function(){ alert(‘button was clicked!’); // to display an alert }); or using the console $(#submit-button).click(function(){ console.log(‘button was clicked!’); // check using web browser console }); If one of them works then there is no issue … Read more