Add_menu_page not displaying the menu in class based plugin

There’s a spelling error on the $capability parameter: $cabability = ‘manage_options’; Here’s the working code for the sake of completeness: class Cosmo_Games { public function __construct() { add_action(‘admin_menu’, array($this, ‘create_plugin_settings_page’)); } public function create_plugin_settings_page() { $page_title=”Game Settings”; $menu_title=”Games Plugin”; $capability = ‘manage_options’; $slug = ‘cg_settings’; $callback = array($this, ‘plugin_settings_page_content’); $icon = ‘dashicons-admin-plugins’; $position = 100; … Read more

How to use $_GET function WordPress backend

Working in the admin is quite a bit different from the front-end of a WordPress site. Most of the documentation you’ll find online deals solely with the front-end. That can be frustrating when looking for something that should be simple and straightforward. In this case, I think you would use get_current_screen(). This returns the screen’s … Read more