Using Gravity Forms ‘gform_menu_position’ PHP filter

The gform_menu_position Gravity Forms PHP filter allows you to modify the position of the Gravity Forms menu in the WordPress admin menu.

Usage

add_filter('gform_menu_position', 'my_custom_function', 10, 1);

function my_custom_function($position) {
    // your custom code here
    return $position;
}

Parameters

  • $position (integer) – Default value 16.9. Position at which to output the Gravity Forms’ “Forms” menu in the WordPress admin menu.

More information

See Gravity Forms Docs: gform_menu_position

Examples

Move Gravity Forms menu below the Comments menu item

This example demonstrates how to move the Gravity Forms’ “Forms” menu in the WordPress admin menu below the “Comments” menu item.

add_filter('gform_menu_position', 'my_gform_menu_position');

function my_gform_menu_position($position) {
    return 50;
}

Move Gravity Forms menu above the Media menu item

This example moves the Gravity Forms’ “Forms” menu above the “Media” menu item in the WordPress admin menu.

add_filter('gform_menu_position', 'move_above_media_menu');

function move_above_media_menu($position) {
    return 9.9;
}

Move Gravity Forms menu below the Pages menu item

This example moves the Gravity Forms’ “Forms” menu below the “Pages” menu item in the WordPress admin menu.

add_filter('gform_menu_position', 'move_below_pages_menu');

function move_below_pages_menu($position) {
    return 21.9;
}

Move Gravity Forms menu above the Appearance menu item

This example moves the Gravity Forms’ “Forms” menu above the “Appearance” menu item in the WordPress admin menu.

add_filter('gform_menu_position', 'move_above_appearance_menu');

function move_above_appearance_menu($position) {
    return 58.9;
}

Move Gravity Forms menu to the top of the WordPress admin menu

This example moves the Gravity Forms’ “Forms” menu to the top of the WordPress admin menu.

add_filter('gform_menu_position', 'move_to_top_of_menu');

function move_to_top_of_menu($position) {
    return 2;
}