Hiding an added admin page menu using css

WordPress already takes care of that for you. The third argument in your add_menu_page function, which reads edit_themes is the capability required to access the page. If the user doesn’t have that capability he can’t access the page, so WordPress won’t show him that option on the menu. Clever, no? Now, from the code you … Read more

Remove the theme info from main dashboard screen- not appearance

You can remove this via javascript. The class of the theme informations is versions and the ID of this Meta Box is dashboard_right_now. The follow screenshot demonstrate how I find this class and id via Crome Webinspector. add_action( ‘admin_footer-index.php’, ‘fb_remove_comments_areas’ ); function () { ?> <script type=”text/javascript”> //<![CDATA[ jQuery(document).ready( function($) { $( ‘#dashboard_right_now .versions’ ).remove(); … Read more

Add internal page to admin menu

Yes, it’s possible. First of all you need a way to identify the page. there are different way to do it: by page slug, by page template… I suggest you to create a fucntion that retrieve that page. Let’s assume the contact page has a page template called ‘page-contacts.php’. function get_contact_page() { $args = array( … Read more

How can I modify text in admin bar?

Are you referring to the meta bar where people can login or register? I’d recommend using jQuery, because if you make the change to the core, it’ll be overwritten once you update it. $(‘a[href*=”register”]’).text(‘join’); This basically states find an anchor tag where the href contains the word register. Once it finds it, it changes the … Read more

Tab order of post admin page

Form fields have something called a tab index. So when you press the tab key it will know where to go next. However when a page has multiple forms the indexes can get mixed up, unless they are clearly specified in each field. Some wp form plugins give you the ability to add the form … Read more

Restricted access for other user roles

Actually its very simple ex: // only administrator if ( ! current_user_can(‘manage_options’) ) { add_action( ‘admin_menu’, ‘remove_woocommerce_menu_pages’, 999 ); function remove_woocommerce_menu_pages() { remove_submenu_page(‘woocommerce’, ‘woocommerce_settings’); } }