Setting admin submenu appears only when I cliked on a custom link

I'm doing a plugin. In this plugin I have to add a submenu for Settings.

Code :

 public function __construct(){
     add_action( 'admin_menu', array( $this, 'add_setting_page' ) );
 }

 public function add_setting_page(){ 
     add_options_page(
            $this-page_title,
            PLUGIN_SHORT_TITLE,
            'manage_options',
            $this-menu_slug,
            array( $this, 'html_page_template' )
    );
}

With the function add_options_page in the official documentation, it's written :

This function takes a capability which will be used to determine whether or not a page is included in the menu.

I manage to go to the right page using a custom link :

a href="/wp-admin/options-general.php?page=my-slug"Custom link/a

But otherwise, the submenu does not appear in Settings menu. How do I need to add to show it in the Settings menu all the time ?

Topic page-specific-settings Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.