WordPress menu issue – if there are child links partents won’t click

First you need to check which theme you are currently using. Then you need to make sure that the theme’s menu supports the depth of objects which you are using.

The so called wp_nav_walker() (it’s a build in WordPress PHP-class) is the function/class, which builds the menu on the frontend.

If the menu-walker does not support the array-parameter depth => 4, then the menu is not capable of outputting this depth of menus.

There may be other reasons for your menu to break, but that’s how I would approach this problem.

You may want to read further about the WordPress menu walker here.

There is also a great tutorial about the menu navwalker on YouTube, which I highly recommend to understand what’s going on under the hood.

See this link: Menu Nav Walker

Since you only vaguely mentioned that you might want to change the code, I’d propose that you contact the theme developer and ask if the menu supports this kind of menu structure.

In case you are able to code, watch the video and overwrite the default menu wp_nav_walker with your own and make sure that the html-output supports 4-levels of ul li > ul li > ul li > ul li.

You can also try to implement/rewrite a Navwalker from GitHub, for example:

Git Twittem Navwalker for Bootstrap 4

Be aware that this output is made for the css-framework Bootstrap.