Manage Sunshine Main Menu Links
Using WordPress filters, we can modify which links appear in Sunshine's Main Menu.
Adding New Links
add_filter( 'sunshine_main_menu', 'sunshine_custom_menu_item', 100 );
function sunshine_custom_menu_item( $menu ) {
$menu[45] = array( // Change 45 to any number, it determines where in the menu it shows
'name' => 'PAGE_NAME_HERE',
'url' => 'YOUR_URL_HERE'
);
return $menu;
}
Learn how to add this custom code to your WordPress website
Removing Login/Register links
add_filter( 'sunshine_main_menu', 'custom_sunshine_main_menu', 999 );
function custom_sunshine_main_menu( $menu ) {
unset( $menu[100] );
unset( $menu[110] );
return $menu;
}
Learn how to add this custom code to your WordPress website
Alternatively add this to Sunshine > Settings > Design > Custom CSS:
#sunshine .sunshine--main-menu li.sunshine--login, #sunshine .sunshine--main-menu li.sunshine--register { display: none !important; }
Learn how to add this custom code to your WordPress website
Still need help?
If you have not yet found your answer in the documentation articles, please contact support