Custom Dynamic Sub-Pages

Hello,

I want to make a Wordpress Subpage Menu that lists the Children and Grandchild pages, the menu should be 1-level deep so for example:

Current Page *Non-Link
Sub-Page 2
Sub-Page 3
Sub-Page 4

When you click on the sub-page the highlighted page becomes non-clickable and still shows the child pages.

Sub-Page 1
Sub-Page 2 *Non-link
Sub-Page 3
Sub-Page 4

I want to be able to also turn this into a widget so, I can have any pages that get added automatically add to the menu, I think the BE Subpage widget does this but, I don’t know how to customize it so it will work on all the pages I want

This website is a good example of what I want to do with the sidebar menu: https://builder.zooka.io/about-us/our-history

Thank you for any help.

Maybe you should look here first


https://developer.wordpress.org/reference/functions/wp_nav_menu/

1 Like