Fatal error when using ‘#’ character as an admin menu link title

I figured out the problem: You must specify an ID in the add_menu array if the title is not alphanumeric. So, this code worked: function my_admin_bar_menu() { global $wp_admin_bar; if ( !is_super_admin() || !is_admin_bar_showing() ) return; $wp_admin_bar->add_menu( array( ‘title’ => __( ‘#’), ‘id’ => __( ‘my_menu_item’), ‘href’ => admin_url(‘myurl.php’))); } add_action(‘admin_bar_menu’, ‘my_admin_bar_menu’); The only change … Read more

Turn on again old expandable menu

Yep, believe so. Try this (enqueue in admin styles): Show sub-menus at all times #adminmenu .wp-submenu, .folded #adminmenu .wp-submenu { display: block !important; } Hide Pop-up Navs .wp-submenu.sub-open { display: none !important; } That should get you started with it, otherwise you can go to wp-admin.dev.css and edit the navigation there, starting at line c. … Read more

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

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