PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

custom_menu_order with Gravity Forms in WordPress 3.5

  1. Matt Banks
    Member

    Having trouble getting Gravity Forms to play nice with custom_menu_order in WordPress 3.5. Here's the code I'm using:

    // Change Menu Order
    function custom_menu_order($menu_ord) {
    	if (!$menu_ord) return true;
    	return array(
    		'index.php', // Dashboard
    		'separator1', // First separator
    		'edit.php?post_type=attorney', // Attorneys
    		'edit.php?post_type=page', // Pages
    		'admin.php?page=gf_edit_forms', // Gravity Forms
    		'upload.php', // Media
    		'edit.php', // Posts
    		'edit-comments.php', // Comments
    		'separator2', // Second separator
    		'themes.php', // Appearance
    		'plugins.php', // Plugins
    		'users.php', // Users
    		'tools.php', // Tools
    		'options-general.php', // Settings
    		'separator-last', // Last separator
    	);
    }
    add_filter('custom_menu_order', 'custom_menu_order'); // Activate custom_menu_order
    add_filter('menu_order', 'custom_menu_order');

    Gravity Forms is showing up below Settings after the last separator. I just grabbed the URL of admin.php?page=gf_edit_forms, but I'm guessing that's what's not right since it's not loading it. Any thoughts?

    Thanks,
    Matt

    Posted 12 years ago on Thursday December 13, 2012 | Permalink
  2. Matt Banks
    Member

    Got it! Had the wrong slug in there for Gravity Forms. Instead of 'admin.php?page=gf_edit_forms', it needs to be 'gf_edit_forms'.

    Posted 12 years ago on Friday December 14, 2012 | Permalink
  3. Thank you for the update.

    Posted 12 years ago on Friday December 14, 2012 | Permalink

This topic has been resolved and has been closed to new replies.