New answers tagged

1

Are you missing a "s" in your variable return $menu_list;? Your array is called $menus_list;


1

In functions.php, change the function magazine_responsive_menu_settings() to the following: function magazine_responsive_menu_settings() { $settings = [ 'mainMenu' => __( 'Menu', 'magazine-pro' ), 'subMenu' => __( 'Submenu', 'magazine-pro' ), 'menuClasses' => [ 'combine' => [ '.nav-...


0

You Can Add This css In style.css or Wordpress Admin panel Option : Appearance > Customize > Additional CSS and Save css #nav .menu li:hover > ul.sub-menu { display: block !important; visibility: unset !important; }


0

This is an old question, but might be very much relevant still today so I thought I would drop a piece of code I developed over the years. It's basically as close as you can get to customizing classes on every element of a menu in WordPress without developing a custom Nav Walker. This is getting more and more relevant with utility-first CSS framweworks like ...


1

If you want to change the permalink structure for all Pages (i.e. posts of the page type), you can use the WP_Rewrite::$page_structure property like so: add_action( 'init', 'wpse_382911' ); function wpse_382911() { global $wp_rewrite; $wp_rewrite->page_structure = 'home/%pagename%'; } Don't forget to flush the rewrite rules — just visit the ...


0

You can use the dynamic_sidebar_params filter: function dynamic_sidebar_before_filter ($params) { $params[0]['before_widget'] = str_replace('class="widget-container', 'class="widget-container w3-white w3-margin-bottom w3-card', $params[0]['before_widget']); $params[0]['before_title'] = str_replace('class="widget-title', 'class="...


0

if you want to hide the top bar menu then you can check it on wordpress.org they alreay provide the full solution. you can put this in your custom css. if you do not know where to add custom CSS then go to theme customization inside the appearance and you can easily access custom CSS. @media (max-width: 768px) { .top-bar-navigation { display: none !important;...


1

https://stackoverflow.com/questions/52006212/how-to-get-current-page-menu-item-ancestor-name-wordpress I found a solution through the answers to the above questions. function my_menu_parent($theme_location) { $locations = get_nav_menu_locations(); if ( isset( $locations[ $theme_location ] ) ) { $menu = wp_get_nav_menu_object( $locations[ $...


Top 50 recent answers are included