Site icon Hip-Hop Website Design and Development

How you can add types to a submenu web page?

I am comparatively new to WordPress and, I’m creating this plugin, the place I would like a submenu web page. I’ve efficiently created the primary web page and have added CSS to it with none issues. Nonetheless, I got here to wish a submenu web page just lately. I used add_submenu_page to create that web page, and it labored simply superb. So far as I do know, I can add as a lot content material to that web page as I need, and it will not be an issue, too. The difficulty began once I tried so as to add types to that web page. I believed I simply had so as to add lessons and IDs to the weather and, then, write their respective type codes within the CSS file used on the primary menu web page. I enqueue the stylesheet utilizing the next code:

operate load_entry_scripts($hook)
{
    if ($hook != 'toplevel_page_edit-dict-entry') {
        return;
    }

    wp_enqueue_style('my-plugin', plugins_url('types/types.css', __FILE__));
    wp_enqueue_script('my-plugin', plugins_url('js/entry-edit-plugin.js', __FILE__), array(), '1.0.0', true);
}
add_action('admin_enqueue_scripts', 'load_entry_scripts');

And, once more, this code works for the primary web page. Lastly, what do I must do, so I can add types to the submenu web page?

PS.: I’ve additionally tried some alternate options, like making a stylesheet particularly for the submenu web page, nevertheless it hasn’t labored both.