Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The Admin Bar (respectively Toolbar since WordPress 3.3) is the dark band at the top of each site. It is only visible for signed in users in order to quick-administer the site via quick-links.

0
votes
1answer
23 views

SOLVED - $wp_admin_bar and AJAX calls

Something weird is happening in my class. Basically I'm trying to manipulate the $wp_admin_bar through AJAX but when I receive the response I get a NULL value. Although debugging the global when my ...
0
votes
0answers
15 views

WP Admin Bar and Ajax Request

I'm trying to get default nodes from the WP Admin Bar through AJAX. I get NULL if I var_dump the variable which should store the Admin bar object. class my_class { var $Admin_bar; public ...
0
votes
1answer
12 views

Admin Bar Acting Up

my admin bar was randomly gone. I ddn't notice at first but I installed BuddyPress and was thinking maybe it was due to this and their specific admin bar stats for guests etc. I de-activated ...
0
votes
1answer
19 views

How to remove logged user profile href link

I have a requirement and the requirement was, I need to remove some menu options from the front end WordPress admin bar after a user logged in. I have achieved almost all. Now I stuck up with the ...
0
votes
1answer
10 views

Admin Bar - Customizer Label Change

I'm desperately trying to find out the best way to change the label "Customize" in the admin bar on the front end to "Customize Theme." Have tried just about everything with no luck. Any help would ...
0
votes
2answers
27 views

Setting proper query for multiple custom admin filters

I am adding custom admin filters for my custom post types. I am a bit confused about how to go with the parse_query filter in order to have my posts filtered based on 2 or more filters. Initially for ...
0
votes
1answer
12 views

Show admin bar to editors with Buddypres

Hi I am trying to show admin bar to editors, but is not working. I am using Buddypress pluging. I dont know if this is the reason but I cant show admin bar for editors and admin. Anybody can help me? ...
0
votes
1answer
58 views

Remove admin bar for subscribers

I have a membership site. I need to disable the admin bar for the subscribers. I have used this code below: add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if (!...
1
vote
1answer
16 views

Pure CSS to “float” to the right the number of children of an admin_bar child node

I've added an admin_bar node. Each item in that node has a variable number of children. I want to display the number of children for each item "floated" to the right of the item's title (with some ...
0
votes
0answers
64 views

Hide Admin Menu Items and Admin Bar Items for only one specific User ID

I got a Wordpress Website with two Administrators: Admin with User ID 1 and Admin with User ID 2 I need to hide several items from the wordpress admin menu and from the wordpress admin bar, BUT ONLY ...
1
vote
0answers
43 views

Using an SVG icon for an Admin menu bar item

I'm trying to add a menu item to the admin top bar that has an icon. I'm adding the menu item using the following code: $iconSVG = '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC ...
1
vote
3answers
78 views

Where is this inline CSS code [closed]

Where is this CSS code? I mean the margin-top: 46px !important!; I need to change it to 1px to rid of top margin. But i didn't found it in any theme's files. Note: I have searched the texts in all ...
0
votes
0answers
79 views

missing admin bar and widget in a template

I do not know why I can not get the admin login bar (when I'm logged in) and why two widgets disappeared in the footer, knowing that the problem only occurred on one page template of the site that I'm ...
0
votes
2answers
521 views

Wordpress Admin Bar Covering & Overlapping Fixed Menu Header [closed]

I am having a problem with the Wordpress Admin bar covering and overlapping my fixed menu header. The theme originally did not have a fixed menu header but I edited the CSS to add one. Also, I added ...
-1
votes
1answer
27 views

Why do my posts look like they are in “admin editing mode”?

I have created a wordpress blog. But when I on my created website and click on a link that leads to one of my posts, I do get to that post, but with the following problem: At the top I see this grey "...
0
votes
0answers
236 views

Create custom admin bar menu items

I am using this code to create a custom menu in the admin bar. For some reason my menu items are nested in each other instead of having the #custom_menu as parent. Why is this happening? function ...
1
vote
1answer
138 views

How to set show admin bar front to true for all users?

I just wanted to know whether it is possible to set for all users show-admin_bar_front meta data to true. I've tried this to put those lines in functions but with no results : // Create the ...
0
votes
1answer
49 views

How to disable users to view Other pages

I have a membership website where my users can create their own page. I use below snippets in function.php to remove the options of published, trash etc. of other users and only show "mine". /** * ...
1
vote
1answer
40 views

Where is the admin bar instantiated?

There are so many resources on how to enable, disable, change and fix the admin bar, but per a question from a student, we just want to follow the path to how it's made. What we know: 1. The trail ...
0
votes
0answers
16 views

When admin is logged in, admin-bar-rtl.min.css is not loaded on website view (the admin-bar is shown in the footer without CSS)

When admin is logged in, the admin-bar on website view is shown in the footer without CSS. I checked the source against other websites & it seems like admin-bar-rtl.min.css is not loaded on my ...
0
votes
1answer
47 views

Remove admin bar “My Sites” link from contributor roll

I have a milti-site that is set up for contributors to author custom posts. I can't use css to modify the adminbar because it remover the links for all user rolls. How can I remove My Sites, Comment ...
0
votes
2answers
908 views

disable wp admin bar for customers logged in

I have a wordpress website, where i am providing customers with user name and password to access my shop. When a customer logs in, he can see the top wordpress admin bar as well. I dont want users ...
0
votes
1answer
215 views

Disable the “Skip to Toolbar” tabbing accessibility feature

Is there a WordPress setting or hook that I can use to disable the WordPress "Skip to Toolbar" accessibility feature? I'm referring to the small popup that appears when tabbing through form controls: ...
0
votes
0answers
13 views

Adding “continue editing my last draft” to admin bar

I have a multi-author website, and I want to make it easier for the authors to access the post edit page, specifically access their latest draft. I'd like to add a link on the admin bar which does ...
1
vote
1answer
2k views

Show admin bar only for some USERS roles

I have 4 users roles on my wordpress platform (role1, role2, role3, role4) I'm looking for to show front-end top bar only for Role1 Role2. how can i add a condition on this code to show it only for ...
0
votes
3answers
486 views

Can't access dashboard after 4.8.1 automatic upgrade

I’ve had an automatic update to 4.8.1 (on local, staging and production-sites) on thursday the 3rd of August and since it is no longer possible to access the admin dashboard. In the header, i have ...
0
votes
1answer
36 views

Change home-url in dashboard

I am wondering if I can change the URL of the "Home"-button in the dashboard's admin-bar. Right now it just redirects to /, but I need it to redirect to /velkommen. Whenever a logged-in user lands ...
0
votes
2answers
486 views

Custom admin bar css on front end bug

I want to apply my valid custom admin bar color scheme to front-end toolbar. I am using this code to do it: add_action( 'wp_enqueue_scripts', function () { wp_enqueue_style( 'color-admin-...
0
votes
2answers
83 views

Change order of an item under “New” on the admin bar

The Admin Bar has a menu with shortcuts for adding new content. By default, it shows "Post", "Media", "Page" and "User". I'm using register_post_type to register a new custom post type. I can use ...
0
votes
0answers
176 views

How to remove an item from menu bar's +New menu based on User role

I want to hide / remove a particular menu item from +New menu on admin menu bar based on specific user role. I referred to this post and tried what is suggested here but for me it did not work. I ...
0
votes
1answer
279 views

How to disable or customize admin bar in back-end

To hide admin bar in front end, we put code in functions.php //hide admin bar add_filter('show_admin_bar', '__return_false'); //or hook action function remove_admin_bar() { ...
0
votes
1answer
200 views

Load admin bar without wp_head or wp_footer

Is there any possible way to load admin bar without wp_head or wp_footer? If no, so maybe there is a way to load wp_head() or wp_footer() to catch only admin bar functions, styles and scripts? Is this ...
0
votes
0answers
43 views

Why do comments fail to load on the Edit Post screen?

As per the title, comments for a post of any type, custom or otherwise, aren't loading on the Edit Post screen. I get the loader indicating that it's doing something but it never manages to display ...
0
votes
1answer
32 views

two different home is showing inside my dashboard?

why i'm getting another home as my sites and again druk country explorer as another home. and how can i remove the the first one
1
vote
0answers
70 views

Wordpress admin panel framework weird layout on server side

I've called theme option panel via functions.php, its layout appears well on localhost, but when I upload it to my hosting account via FTP panel columns floating itsel to the left. I think this is ...
2
votes
2answers
1k views

Adding a menu item in the admin bar

I would like to add a new menu item in the admin bar. So far, I have done the following: function add_book_menu_item ($wp_admin_bar) { $args = array ( 'id' => 'book', ...
1
vote
0answers
41 views

Why Is This Code Causing The Admin Bar to Disappear?

I have the following code: function show_offering_categories() { $terms = get_terms( array( 'taxonomy' => 'offering_category', 'hide_empty' => 1, // Yes 'parent' =>...
0
votes
1answer
312 views

How do you disable the admin-bar.css

I don't want to fully disable the admin bar. I just want to remove its css file so I can fully customize it myself without having to override anything with greater selectors or a load of !important ...
0
votes
0answers
202 views

need help styling dashicon in admin bar

I am adding my custom post type to the admin bar for the convenience of the end user. I added an icon to it with the following code, $wp_admin_bar->add_node( array( 'title' => '<...
0
votes
1answer
836 views

How to make custom button link on the WordPress Admin Bar run by AJAX

I know how to add a link in the admin bar using admin_bar_menu action. I want to run a script to purge cache on a click of button present in admin bar by AJAX. function add_item($admin_bar){ ...
0
votes
1answer
24 views

Admin Bar items active only on plugin page

Am looking to use the admin-bar to house the title of our plugin and links for options and admin pages of our plugin. This includes removing current links and nodes held on the admin bar. No issues ...
0
votes
1answer
325 views

Unable to display Wordpress admin bar in the frontend as an admin

I've inherited a Wordpress multisite install. I'm in the process of redesigning several of the subsites and I've noticed that Wordpress is not displaying the admin bar in the front-end, even as an ...
0
votes
1answer
511 views

How do I change the hover (focus) color of admin bar from frontend?

I'm styling my adminbar from frontend, I followed some tutorials to do this. The only thing I didn't get it done it was change the default blue text hover color and gray background hover color of the ...
1
vote
3answers
1k views

A similar hook as wp_head for the admin area

I'm adding a node to the toolbar and wish to tweak the css a bit. I don't have any external CSS files and I'm echoing the CSS using the wp_head action hook. Is there a similar action hook that I can ...
0
votes
1answer
24 views

How can I add metaboxs to Admin Bar?

Is there a way to add a metabox to the admin bar? My goal is to be able to change the categories, tags and publish date / time, status & visibility of a post on the front end of any post/page. I'...
3
votes
2answers
1k views

Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress

I've made my own PHP page and used it as a part of my WordPress website. I'm using some WordPress functions and want to have it fully integrated with WordPress itself. Although I've loaded WordPress,...
2
votes
1answer
291 views

WP Admin Bar frontend issue with dashicon deregister

A few days back I started working on re-optimizing my site to even great extent. While analyzing, I saw that WordPress dashicon files gets added to each page of my site but as we all use fontawesome ...
5
votes
1answer
230 views

How to add some custom HTML into wordpress admin bar?

I want to add some HTML (for showing count of specific type post in database) Wordpress is new to me, I don't have much knowledge about hooks and filters. As i understand i need to do following work ...
3
votes
2answers
277 views

How to get an array of menu items from the toolbar?

Similar to generating an array of the admin menu/submenu: global $menu; foreach ( $menu as $group => $item ) { echo '<pre>'; print_r( $item ); echo '</pre>'; } How can I get an ...
1
vote
1answer
328 views

Turn off Admin Bar (Toolbar) in backend - no easy way

I'm working on a theme for the back end Admin pages, this is for a custom web application built on WP. After studying admin-bar.php and the function is_admin_bar_showing() for a few minutes I decided ...