Please tell me how to create a new button here (at the bottom of the dashboard left-hand navigation): http://prntscr.com/6rlbda
This button only needs to transmit one GET parameter.
Thanks.
You can't add a "button" to the menubar, only a standard link (though you can choose the icon.)
Also your question doesn't specify what you actually want the button (or page it links to) to do, but the standard approach is:
add_action( 'admin_menu', 'register_my_menu_item' );
function register_my_menu_item() {
# the add_action ensures this is only run when admin pages are displayed
add_menu_page( 'Example page', 'Example menu', 'manage_options', 'query-string-parameter', 'my_menu_item');
}
function my_menu_item() {
# your new admin page contents (or behaviour go here)
echo 'Hello World!';
}
(This should ideally go in a plugin, but it can also go in your theme's functions.php
)
Documentation: https://codex.wordpress.org/Function_Reference/add_menu_page
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments