I decided to use “Intentionally Blank” as the main theme for my backend. I find the possibility of not showing anything at the frontend very convenient. I won’t explain here how to activate a theme in WordPress, but I noticed a small limitation of this theme that we are now going to solve.
The “Intentionally Blank” theme doesn’t have any registered menu locations, so we don’t have the option to set a frontend menu, but there is a solution. Let’s create a Child Theme of this template. If you don’t know what a Child Theme is or have any doubts about how to proceed, my advice is to check on the WordPress Developer Resources:
Once you have created your child, proceed to activate it and let’s add the registration of a ‘primary’ menu:
1
2
3
4
5
6
function ibc_add_nav_menus() {
register_nav_menus([
'primary' => __( 'Primary Menu', 'ibc' )
]);
}
add_action('init', 'ibc_add_nav_menus');
If you want to know more about these few lines of code, I always recommend visiting the official WordPress documentation at the following link:
It is vital not to change the primary key, since you go right to load from this locations key in the HeadstartWP starter theme. Now, you can create your menu from the backend and set Primary Menu
as location, you will immediately see the menu items you have set on the next load in the frontend.
Published: 7/15/2023