• Actually, this is a Notice, that shows up when WP_DEBUG is enable
    d in the site

    The full error is:

    Notice: add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information.

    WordPress: 5.7.2
    Instant Indexing for Google : 1.0.0

    So to fix this, i removed ‘none’ in this file:
    the function name is admin_menu()
    fast-indexing-api/includes/class-instant-indexing.php #379

    Actually the position param is optional, so i just removed int 76 also.
    After removing my code looks like this:

    $this->dashboard_menu_hook_suffix = add_submenu_page( 'instant-indexing-dashboard', 'Rank Math', __( 'Dashboard', 'fast-indexing-api' ), apply_filters( 'rank_math/indexing_api/capability', 'manage_options' ), 'instant-indexing-dashboard', array( $this, 'show_dashboard' ) );

    After this, the Notice in php should disappear.

    Regards.

    • This topic was modified 3 years, 9 months ago by ugene.
  • The topic ‘add_submenu_page was called incorrectly’ is closed to new replies.