How to hide “post” link from the admin bar
Try this: $wp_admin_bar->remove_node( ‘new-post’ ); It will remove Post link under the admin bar’s + New link. LEARN MORE: remove_node() – WordPress Codex
Try this: $wp_admin_bar->remove_node( ‘new-post’ ); It will remove Post link under the admin bar’s + New link. LEARN MORE: remove_node() – WordPress Codex
Just use is_admin_bar_showing() to check if the currently logged in user is logged in has activated the admin bar in his user settings/preferences
Obviously you cannot put a select tag inside a A anchor. What happens is related to event bubbling: Firefox takes the A anchor click into account, not the select control. Change your html to: <li id=”wp-admin-bar-abstractambienceantisocialapertureapzauldbackstagebig-easybiznizzbloggingstreamboastbold-newsbusy-beecaffeinatedcanvascanvas-buddypress-betachapterscinchcity-guidecodacoffee-breakcontinuumcrispcush” class=””> <select name=”themeswitcher” onchange=”location.href=this.options[this.selectedIndex].value;” style=”color: #000; text-shadow: none;”> <option value=”http://themes.fusionized.com?wptheme=Abstract” style=”color: #000; text-shadow: none;”>Abstract</option> <option value=”http://themes.fusionized.com?wptheme=Ambience” style=”color: #000; text-shadow: … Read more
Not sure exactly, but adding the following two functions should get it to work and save you other headaches as well: Right before the closing head tag add: <?php wp_head(); ?> And right before the closing body tag add: <?php wp_footer(); ?>
Found my answer including my full solution: <?php /* Plugin Name: Rename Posts to News Description: Rename built in posts to be called News Version: 1.0 Author: Scott Cariss @ Philosophy Design Author URI: http://www.philosophydesign.com */ // Not a WordPress context? Stop. ! defined( ‘ABSPATH’ ) and exit; add_action( ‘init’, array ( ‘chg_Posts_to_News’, ‘init’ ) … Read more
WP Core actually uses Open Sans font; it’s not a plugin. there is a plugin that removes it, but you can probably simply dequeue or deregister it. adding this to functions.php should work; if you want it removed from the backend as well, hook into the admin_print_styles action. function dequeue_opensans_css() { wp_dequeue_style( ‘open-sans’ ); } … Read more
Well, the dashicons are used in the admin bar, so if you deregister them, your admin bar is broken. The easy way out is only to deregister the icons if there is no admin bar: add_action( ‘wp_print_styles’, function() { if (!is_admin_bar_showing()) wp_deregister_style( ‘dashicons’ ); }, 100);
I had a similar situation. My custom post type showed up under the Admin Bar as Artifact, but my clients preferred it to be at the top of the list. Plus, the items for Media and User were not really needed. My approach was first to user remove_node to take away all the ones except … Read more
What you are seeing is probably produced by _admin_bar_bump_cb(). From quick look at code it includes following instructions inline in WP_Admin_Bar class: To remove the default padding styles from WordPress for the Toolbar, use the following code: add_theme_support( ‘admin-bar’, array( ‘callback’ => ‘__return_false’ ) );
I see a couple of problems here. This line if (!is_admin() || ‘default’ != $domain) return $translated; returns the Howdy right back unchanged if is_admin is false – which it is if you’re not in the dashboard. Also, you’re running your filter callback on gettext. This means it will be run every time some internationalized … Read more