Last active
November 2, 2022 10:17
-
-
Save webmandesign/0f56c1a9a219ab3ce251a5844d33924b to your computer and use it in GitHub Desktop.
WordPress 6.1.0 sub-menu issue fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Put this code (without the "<?php" above) into your child theme's "functions.php" file. | |
* Use this only to fix sub-menu issue in WordPress 6.1.0. | |
* Tip: Check https://support.webmandesign.eu/child-theme/ for more info on child themes. | |
*/ | |
add_filter( 'wp_nav_menu_args', function( $args ) { | |
$args['depth'] = 0; | |
return $args; | |
} ); |
NOTE:
This code actually does not fix the WordPress 6.1.0 issue, it only prevents triggering it.
For more info about the issue check https://core.trac.wordpress.org/ticket/56946
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code fixes WordPress 6.1.0 issue with sub-menus in navigation not displaying or working correctly.
Put the code (without opening
<?php
) into your child theme'sfunctions.php
file.Tip: For more info on child themes check https://support.webmandesign.eu/child-theme/