WordPress Admin sub-level menu issue

Got it working like this: function print_admin_menu() { add_options_page( ‘Print Configuration’, ‘Print Configuration’, ‘manage_options’, ‘print_admin_config_page’, ‘my_callback’ ); } function my_callback(){ ?> <div class=”wrap”> <h2>Welcome To My Plugin</h2> </div> <?php }

How to disable users to view Other pages

<?php add_filter(‘pre_get_posts’, ‘my_current_author_posts’); function my_current_author_posts( $query ) { global $pagenow; // Check if you are on the right Admin page, do nothing if not if( ‘edit.php’ != $pagenow || ! isset( $_GET[‘post_type’] ) || ‘page’ != $_GET[‘post_type’] || ! is_admin() ) { return; } // get current user Object $current_user = wp_get_current_user(); // check user … Read more