How to keep the plugin submenu open on viewing a custom version of users.php?

You must use a different parent slug (first parameter) to keep the user menu as you want. An example, add_action(‘admin_menu’, ‘register_subscriber_submenu_page’); function wpdocs_register_subscriber_submenu_page() { add_submenu_page( ‘users.php’, ‘Subscribers’, ‘Subscribers’, ‘manage_options’, ‘custom-submenu-page’, ‘custom_callback_function’ ); } Try to prefix your plugin page slug, you can have conflict with such a name : ‘subscribers’ -> your-plugin-subscribers . You will … Read more

Create an administation subpage containing posts in a certain category

See my answer here on a similar question https://wordpress.stackexchange.com/posts/comments/401940?noredirect=1 that discusses a plugin I did that might start to meet your needs. The plugin is called Multisite Post Reader, and can be found here: https://wordpress.stackexchange.com/posts/comments/401940?noredirect=1 Comments about additional features can be posted in the plugin support page. If the plugin is not exactly what you … Read more

Admin submenu does not call function to load the page

I found my solution. Problem of hrefs when the wordpress core did not find the function callback or it’s empty for the functions add_menu_page() and add_submenu_page() the href wil be generated like this : http(s)://my-site.org/wp-admin/my-slug-page, otherwise the href is in this format : http(s)://my-site.org/wp-admin/admin.php?page=my-slug-page So In my case, I had to be sure the functions … Read more

Admin menu hilighting wrong item for CPT

Check: add_submenu_page( ‘edit.php?post_type=landingpage’, ‘Form Settings’, ‘Form Settings’, ‘manage_options’, // This is the menu slug, you can not pass the arguments, // if you want to pass arguments then add only one sub menu page and // links with arguments, also display content with conditions of passed arguments. ‘wp_cpt_plugin_page-form-settings’, ‘my_callback’ );

Submenu Page under Settings in Admin Panel

I didn’t test this but i’m pretty sure you just need to remove your code from the admin_menu() function declaration. Like this: add_action(‘admin_menu’, ‘register_my_custom_submenu_page’); function register_my_custom_submenu_page() { add_submenu_page( ‘tools.php’, ‘Submenu Page’, ‘My Custom Submenu Page’, ‘manage_options’, ‘my-custom-submenu-page’, ‘my_custom_submenu_page_content’ ); } function my_custom_submenu_page_content() { ?> <div class=”wrap”> <h2>Page Title</h2> </div> <?php }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)