• Resolved Danielle Bishop

    (@danielle-bishop)


    I’ve been trying to find documentation on this for the past few hours without success. What I’d like to do is set up a custom base favorites menu for new users registered to my site.

    Anyone know how to do this? A plug-in or a link to some documentation would be cool too.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Sure, you can do wonders with the new custom menus in WordPress 3.x. Just see the wp_nav_menu() for more information, in particular the part about different menus for logged in users.

    http://codex.wordpress.org/Function_Reference/wp_nav_menu#Different_menus_for_logged-in_users

    Your theme needs to support custom menus for you to be able to use this function of course.

    Thread Starter Danielle Bishop

    (@danielle-bishop)

    Thanks David. Wasn’t quite was I was looking for, but I did manage to find my answer here:

    http://www.webmaster-source.com/2008/12/22/add-an-item-to-wordpress-27s-favorites-menu/

    My present code for unsetting defaults and adding my own custom items:

    //Add the favorite menu filter & call to function
    add_filter('favorite_actions', 'custom_admin_favs');
    
    //Define custom favorite menu function
    function custom_admin_favs($actions) {
    	/*	DEFAULT WP ACTIONS
    		$actions['post-new.php'] = array(__('Add News'), 'edit_posts');
    		$actions['edit.php?post_status=draft'] = array(__('Drafts'),'edit_posts')
    		$actions['post-new.php?post_type=page'] = array(__('New Page'),'edit_pages')
    		$actions['media-new.php'] = array(__('Upload'),'upload_files')
    		$actions['edit-comments.php'] = array(__('Comments'),'moderate_comments')
    	*/
    
    	/* Remove default WordPress actions */
    	unset($actions['post-new.php']);
    	unset($actions['edit.php?post_status=draft']);
    	unset($actions['post-new.php?post_type=page']);
    	unset($actions['media-new.php']);
    	unset($actions['edit-comments.php']);
    
    	/* ADD New Options for MY THEME */
    	$actions['post-new.php'] = array(__('Add News'), 'edit_posts');
    	$actions['post-new.php?post_type=artist_post'] = array(__('Add Artist'), 'edit_posts');
    	$actions['post-new.php?post_type=release_post'] = array(__('Add Release'), 'edit_posts');
    	$actions['edit.php?post_status=draft'] = array(__('View Drafts'), 'edit_posts');
    
    	return $actions;
    }

    Not too sure this is the most efficient way to go about it, however it’s working as I wanted.

    Apparently “Favorites Menu” is removed starting with WordPress 3.2

    See WordPress 3.2 Beta2

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Favorites Menu for New Users’ is closed to new replies.