Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,840
- How-to & Troubleshooting
- 129,871
- Creating & Extending
- 25,907
- Requests & Feedback
- 9,549
- Third Party Plugins
- 9,832
- Showcase
- 3,316
- Ideas
- 1,402
- Miscellaneous
- 9,179
-
Should have tested my function first as it didn’t work. This one i’ve tested and it does work:
function custom_menu_item ( $items ) {
if ( !is_user_logged_in() ) {
$items .= '<li><a href="/register" title="Register">Register</a></li>';
}
return $items;
}
add_filter( 'wp_nav_menu_items', 'custom_menu_item' );