This should get you started. Once you’re more confident in plugin design I recommend using plugin boiler-plates you can create for free here: https://wppb.me/ They’ll look pretty scary at first but as you gain confidence and knowledge, you won’t be able to live without them.
Note: this is me just typing, expect typos.
function My_Cool_Menu() {
$icon_url = plugin_dir_url(__FILE__) . 'images/MyMenuIcon.png';
add_menu_page('My Cool Page Title', 'My Cool Menu Title', 'edit_posts',
'MyPluginSlug', 'My_Cool_Plugin_main_menu', $icon_url);
}
function My_Cool_Plugin_main_menu() {
//create your html admin menus, buttons and such in this file
include_once( 'MyCoolAdminPage.php' );
}
add_action('admin_menu', 'My_Cool_Menu');
edit and be sure you learn all about nonces!
Related Posts:
- Using standard backend elements in Plugin
- Extend Elementor Archive Posts widget with a custom skin in order to show multiple badges
- How to implement WordPress plugin update that modifies the database?
- wp.media update options and force render on uploader
- WordPress Plugin Development In MVC Architecture, How?
- Customize plugin update “new version is available” text
- category_name not working (not showing up in sql query debug)
- “Donate to this plugin” for WordPress.org Plugin Authors
- What happens when two plugins have the same 3rd party class included into them?
- add_rewrite_rule, plugin activation and plugin deactivation
- How to handel multiple checkbox field in the admin settings page with Settings API
- Update Multiple Post Meta for the Same Post In One call?
- Allowing Custom Capability to Manage Plugin Options
- wp_insert_user – how to send verification email before logging in
- Custom plugin settings: clicking “save changes” does not display success message
- How to show custom message once on plugin activation?
- How do I configure WordPress to talk to a Microsoft SQL Server database?
- How to load a new template page according to a particular URL?
- How ( and mostly at what time ) can i prevent the alternate cron from running?
- What is the function to get plugin base url in multisite?
- PDF download – use wordpress functions
- How can I filter blog name?
- API to filter new user registration $POST data?
- Detect if a plugin was included in a certain page
- Set cookie then immediantly refresh the page
- How to add an attribute to the body tag with a plugin?
- Override the core function locate_template
- What is the way to ship read-me strings like plugin-strings for internationalization?
- Variable from a plugin into a theme
- Upload file inside plugins options page
- How to automate wordpress plugin activate and deactivate by php logic?
- How to get variables from fucntion.php to my plugin files
- Is there any way to get all the name or slug of template parts used in a page?
- What function can I use consistently to escape possible HTML for editing and display?
- First WordPress Plugin – Stat Issues
- How to change custom post type pemalink Hierarcy
- Test files for plugin development
- Updating the Drag-To-Share eXtended share URLs?
- Send Custom welcome email to specific user group
- WordPress.org Plugin Directory doesn’t recognise screenshots [closed]
- How to check current user before all actions and filters?
- WordPress Backend HA (Automatic failover)
- List the authors that have written posts in a category
- Is it necessary to auto delete my WP plugin database tables when users deactivate/delete my plugin?
- Namespaced shortcode?
- How to pass variables to a function argument using add_action [duplicate]
- My custom plugin did not create db tables in database
- Custom post types – remove default post supports through empty array?
- How to insert and call new data in wordpress website database through a plugin
- How to be escape Variables and options when echo?
- Release the plugin in the WordPress repository where redux is used
- Dokan Marketplace store link in single product page
- YOAST Seo xmlsitemap menu item not showing in the dashboard [closed]
- Development of plugins to add components like JqueryUI
- Possible?? Pull Plugin Property Data to a Theme’s Custom Post Type
- Using meta_query in a WP_Query not working for numbers properly
- why the wp_register_script doesn’t work for register_activation_hook
- Plugin is creating posts twice
- How do I reliably find a URL to a script or other file?
- How to add captcha to publish widget
- How to add logo to a WordPress Custom Plugin?
- Use a custom block in another block
- Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
- GitHub plugins safe to use in my website?
- Fixed: Console.log twice in the edit function
- Using OR Condition with facetwp facets
- How to copy the all WordPress media items to another custom plugin folder?
- Personality quiz in wordpress using a plugin
- How can we get this dynamically as this folder may not be by the same name always → wp-admin
- Error on plugin activation and creating new page
- Child theme modifications not showing up
- Why is my shortcode not working?
- Link custom post type to page
- implement checkbox or toggle switch in plugin code
- wp_remote_post To external API multiple values with the same key
- wordpress form not saving or updating
- Function settings_fields() not recognized (Uncaught Error: Call to undefined function settings_fields())
- Why my multisite is this slow? (stats inside)
- what’s different between wpdb->prefix and table_prefix
- Can we rename a plugin directory for a already launched plugin?
- How to use custom footer template in a site-plugin?
- How can I call functions from a custom plugin?
- How to get short description under heading – Visual Composer [closed]
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- trying to create simple plugin to filter categories from all authors
- How to create a new database table whenever user changes options
- Am I correctly adding styles to plugin?
- How can I insert a record into a custom table from my custom form in my custom admin page?
- how to create table during plugin installation in side a class
- WP_Filesystem usage within a block of code
- Proper Failure of Plugin Activation
- Why function hooked using object are executing at all time?
- What is the Object for WP_Error Class?
- How can I use multi Media Uploader in a plugin?
- Ajax in Plugins: returns the whole page
- Gutenberg: Dynamic Block – Show saved data in the editor
- how to search through plugin in wordpress cimy-user-extra-fields?
- Any way to hook into WP after a page displays?
- Meta box not displaying on the plugin page
- public custom posts not showing in my wordpress plugin