How can I click the parent menu then redirect to a special URL?
Source In the wp-admin under menus you just have to replace the ‘#’ with the url for the parent item.
Source In the wp-admin under menus you just have to replace the ‘#’ with the url for the parent item.
How to work with a custom theme that someone else created before me? (details below)
Menu not updating for logged in users after redirect
Yes, you can add the alt attribute. But there is a catch. When the theme is updated, all your changes or modification to the theme will be lost. It is recommended to make those changes in the child theme. You can learn more about WordPress child theme here
I am sure you went down this path already, but be sure register menus and support for theme: register_nav_menus( array( ‘Main’ => ‘Main Navigation’, ‘Secondary’ => ‘Secondary Menu’ ) ); And then follow your pattern of ‘theme_location’ => ‘Secondary’ to print your registered menu back.
From class Walker_Nav_Menu: function start_lvl( &$output, $depth = 0, $args = array() ) Your child class must use the same signature: three arguments, the first one passed by reference. Every difference will raise the error you got. Note that $args defaults to an empty array, but you get an instance of stdClass, not an array. … Read more
Check Screen Options in Menu Editor window, you should have your cpt box checked.
having a page in multi sub-menu and match current-menu-item
I went to the GeneratePress site and looked at one of their demos: <nav id=”site-navigation” class=”main-navigation sub-menu-left” itemtype=”https://schema.org/SiteNavigationElement” itemscope> <div class=”inside-navigation”> <button class=”menu-toggle” aria-controls=”primary-menu” aria-expanded=”false”> <span class=”mobile-menu”>Menu</span> </button> <div id=”primary-menu” class=”main-nav”> <ul id=”menu-menu-1″ class=” menu sf-menu”> <li id=”menu-item-594520″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-home menu-item-594520″><a href=”https://generatepress.com/”>area riservata</a></li> <li id=”menu-item-594521″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-594521″><a href=”https://generatepress.com/premium/”>Premium</a></li> </ul> </div> </div><!– … Read more
Well. After a little search with the intention to find a way to re-use my category template (Sport), I found the solution of my problem: Force sub-categories to use the parent category template So I let this solution here in case of someone has the same problem and the same weird idea to resolve it … Read more