Customizing the Wordpress admin bar

Hi!

I'm customizing the wp admin bar and here are some things I'd like to get help with -I'm using Custom Admin Bar, the one that comes inside Ultimate Branding.
1-I've tried deleting the test submenu item that appears when hovering the mouse over "Wheel of Commerce", but the delete button in custom admin bar simply doesn't work.

2-I'd like to know how to change the position of the items, because when I click on the reorder button, it doesn't show the login item, for instance.

3-Instead of having a separate login buton the way it is right now, I'd like to have the dropdown login box appearing when the user passes the mouse over the "Login" link that's already at the admin bar. That dropdown login box is from Protected Content Mojo -a plugin that implements add-ons to Protected Content.

4-I want to remove the log out button that stays at the top left side of the screen after the user is logged in -it's right beneath the wp admin bar. It's the one that shows the profile pic and expands to display a log out button, it's from Protected Content Mojo -a plugin that implements add-ons to Protected Content. The log out function is already present in the admin bar itself, so it doesn't make sense to have it displayed twice.

Thanks. :slight_smile:

  • Tyler Postle

    Hey Gabriel,

    Hope you're doing well today!

    1-I've tried deleting the test submenu item that appears when hovering the mouse over "Wheel of Commerce", but the delete button in custom admin bar simply doesn't work.

    This was due to a conflict with your php shortcode exec plugin, I deactivated it temporarily and was able to remove the sub test menu item :slight_smile:

    2-I'd like to know how to change the position of the items, because when I click on the reorder button, it doesn't show the login item, for instance.

    That frontend admin bar is actually from BuddyPress, so it's not default WordPress. That's why the login/register links that come with it aren't showing in the Ultimate Branding settings, we can easily hide the login button with this CSS though:

    #wp-admin-bar-bp-login {
      display: none;
    }

    If you don't have a custom CSS plugin then you can use this one here: https://wordpress.org/plugins/simple-custom-css/

    3-Instead of having a separate login buton the way it is right now, I'd like to have the dropdown login box appearing when the user passes the mouse over the "Login" link that's already at the admin bar. That dropdown login box is from Protected Content Mojo -a plugin that implements add-ons to Protected Content.

    This would take custom development to achieve. It would be changing default BP functionality since that is where the admin bar is from. You could try asking the Protected Content Mojo developer as it's a third party plugin.

    4-I want to remove the log out button that stays at the top left side of the screen after the user is logged in -it's right beneath the wp admin bar. It's the one that shows the profile pic and expands to display a log out button, it's from Protected Content Mojo -a plugin that implements add-ons to Protected Content. The log out function is already present in the admin bar itself, so it doesn't make sense to have it displayed twice.

    You can try this CSS:

    .pcmj-floating-login.pcmj-logged-in {
      display: none !important;
    }

    That should remove it only while logged in, so the "log in" one is still available to visitors.

    Hope this helps Gabriel! Let us know if you have any further questions.

    All the best,
    Tyler

  • Wheel of Commerce

    Hi! Thanks for answering.

    -Regarding the login button at the admin bar, even though it's being generated by buddypress (I'm presuming the Register button falls into the same case), isn't there a way to change the positioning? I'd like to display the buttons there in the following order: Site's name, Login (that would open the dropdown login and registration box), then all the links to the main pages of the site, like forums, groups, etc..

    -I'm having an issue with Custom Admin Bar: when I remove the "My sites" button, it also gets removed for the super-admin. As I use the Wheel of Commerce account in my site as a template for all the other accounts, I need to access its back end constantly. How do I do that in other way, that not through the My sites button in the admin bar? Or even better: how can I remove the My sites button for every account but the super-admin?
    If none of those are possible, can I at least hide it from regular users through CSS?

    Thanks.

  • Wheel of Commerce

    As WPMU site didn't allow me to edit my last post, here's the updated version of it:
    1-I've checked my Shortcode Exec PHP panel and I can see there's a code inserted there. I'd like to know if that can be removed without causing any issues. I want to keep that plugin, even if deactivated, because it's really useful. I'm not making any changes to it myself because last time I tried to pull something like that it took me almost 2 whole weeks to fix the issues caused by my modifications, and I want to avoid unnecessary problems.

    2-Regarding the login button at the admin bar, even though it's being generated by buddypress (I'm presuming the Register button falls into the same case), isn't there a way to change the positioning? I'd like to display the buttons there in the following order: Site's name, Login (that would open the dropdown login and registration box), then all the links to the main pages of the site, like forums, groups, etc..

    3-I'm having an issue with Custom Admin Bar: when I remove the "My sites" button, it also gets removed for the super-admin. As I use the Wheel of Commerce account in my site as a template for all the other accounts, I need to access its back end constantly. How do I do that in other way, that not through the My sites button in the admin bar? Or even better: how can I remove the My sites button for every account but the super-admin?
    If none of those are possible, can I at least hide it from regular users through CSS?

    4-I'd like to remove the message and links that are displayed right beneath the admin bar (top left corner) after an user logs in: "Welcome, username | My Stores | Log out". If I can't remove it, I want to at least hide it through CSS.

    5-I managed to get a Register button inside the dropdown login box, and it's redirecting to /register-store, and not to the /register page from Protected Content, so now it's exactly the way I wanted it. I've noticed something odd though: when I click on View, under Register store, in the list of wp pages, instead of redirecting me to /register-store, it's redirecting me to the home page. I'd like to solve this, because from my previous experiences, apparently insignificant issues of this nature can end up causing serious problems in the future.

    Thanks.

  • Wheel of Commerce

    Update:
    -I finally found a plugin for a login form that is exactly what I was searching for: it inserts an username and password fields into the wp admin bar. So far, so good. The thing is: for some reason that I haven't figured out yet, instead of inserting it in the horizontal, to fit into the bar (like what it's supposed to do), the form is being displayed in the vertical, with the password field under username. Below is the plugin's page that shows a screen shot of how it should be displayed:
    https://wordpress.org/plugins/admin-bar-login/screenshots/
    I already tried deactivating Shortcode Exec PHP, after the code inserted in its panel does refer to the login form (even though it's the old one), but it didn't make any difference. I've also removed the widget for the old login form from my sidebar widgets, so I really don't knoe what can be causing this.

    Thanks.

  • Wheel of Commerce

    Updating with what was discussed with Tyler during chat:
    I finally found a plugin that does what I want. The thing is: it doesn't work. In the second screen shot below, you can see that drop down login box:
    https://wordpress.org/plugins/wp-sliding-login-register-panel/screenshots/

    Below are two pages with info that might help making the plugin work, given the fact that it shows code to display the drop down box from the admin bar:
    http://thefinishedbox.com/freebies/scripts/jquery-dropdown-login/
    http://red-team-design.com/simple-and-effective-dropdown-login-box/

    I've removed my old login widget from the side bar and deactivated Shortcode Exec PHP (that has code regarding my old login form in its panel), but WP Sliding Login (name of the plugin I'm trying to make work) still doesn't function.

    Thanks.

  • Tyler Postle

    Hey Gabriel,

    Thanks for updating the thread. I took a look at this plugin on my install and it works as expected. The issue you're having is that the wp sliding login plugin is its own admin bar. It's displaying on your site but behind the admin bar you have.

    So you would have to choose one or the other, or have a developer combine then. At that point it might be easier to just have a developer custom code you your own sliding login to your exact specifications :slight_smile: you would likely be more happy with the result in that case too.

    Hope that clears up the issue you're seeing at least!

    As mentioned before, we do have a jobs board you can post these sorts of jobs on too - if that is what you want done anyway: https://premium.wpmudev.org/wordpress-development/

    Thanks again for stopping by the chat!

    Cheers,
    Tyler

  • Wheel of Commerce

    Thanks for answering, man!

    I've sent an email to the dev of Protected Content Mojo, that does insert a dropdown login box, but it's not hooked up to the "Login" button in the admin bar -it has it's own login button outside the bar. He might come up with something.

    I've hidden the admin bar through Protected Content, but still can't see the bar WP Sliding Login is supposed to generate.

    Now that you mentioned that about the plugin, it does say in its description:
    "Add a sliding login | register panel to WordPress Theme.
    Instead of modifying directly theme files, just install this plugin so you can preserve you panel when switching between themes and during themes updates."
    So I thought: is it hard to insert links to my pages in that bar this plugin creates? That might be an option.

    I'll see how things go. If anything, I'll just get a dev to do it for me. I just want to eliminate all possibilities here, because at least for now I'm taking this whole thing as an experiment, so I don't intend to spend a bunch of cash before launching the site, as I already know I'll be spending at least some hundreds with hosting.

    Thanks again, man. I'll keep trying whatever I can here, and checking on your replies to see what's the most viable solution.

  • Wheel of Commerce

    Update:
    After talking to Protected Content Mojo dev, looks like I have to hire a dev if I want that drop down login box in the wp toolbar. Nevertheless, there's still that Admin Bar Login plugin, that inserts the login fields directly into the wp bar. But for some reason the fields are being displayed in the vertical instead of the horizontal. If I can get it working, that'd be great.

    Thanks once more.

  • Michelle Shull

    Gabriel! Hello!

    I tried several tricks to get your login to display horizontally instead of vertically, and nothing was taking, so I did some digging.

    This is a pretty common issue for users of this plugin, it appears, but a kind person in one of the plugin's support threads offers this:

    Now that I have fixed it, I will be kind enough to share (sharing is caring after all). The CSS file protects itself by going inactive for edits so anything you do within WP plugin edits will not affect the plugin. You have to deactivate the plugin in WP, download the plugin PHP file and CSS file via FTP, edit the CSS to say display:inline; instead of display:block; and re-save. Then edit the PHP (optional) if you want to change the page that the register link goes to. I manage a paid member site so going to wp-admin was not the right page for me. Once both files are saved, upload them back to the plugin folder, overwrite existing then reactivate plugin in WP...

    Cheers

    Source.

    Can you give this a try?

    Thanks!

  • Wheel of Commerce

    Hi! Thanks for answering.

    Tried and it didn't work. Actually, there isn't a "display: block", but just a "display: inline-block! important;", so I removed the "-block". Below is the full original CSS:

    #adminloginform p {
    	display: inline!important;
    }
    
    #adminloginform .login-username input,
    #adminloginform .login-password input {
    	font: 13px/24px sans-serif;
    	padding:0 4px 0 4px;
    	height: 24px;
    	line-height: 20px;
    	border: none;
    	color: #555;
    	text-shadow: 0 1px 0 #fff;
    	background-color: rgba( 255, 255, 255, 0.9 );
    	-webkit-border-radius: 3px;
    	border-radius: 3px;
    }
    
    #adminloginform #wp-submit {
    	display: inline-block!important;
    	text-decoration: none;
    	font-size: 13px;
    	line-height: 26px;
    	height: 28px;
    	margin: 0 0 2px 0;
    	padding: 0 10px 1px;
    	cursor: pointer;
    	border-width: 1px;
    	border-style: solid;
    	-webkit-border-radius: 3px;
    	-webkit-appearance: none;
    	border-radius: 3px;
    	white-space: nowrap;
    	-webkit-box-sizing: border-box;
    	-moz-box-sizing:    border-box;
    	box-sizing:         border-box;
    	background: #2ea2cc;
    	border-color: #0074a2;
    	-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15);
    	box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15);
    	color: #fff;
    	text-decoration: none;
    }
    
    #adminloginform #wp-submit:active {
    	background: #1e8cbe;
    	border-color: #005684;
    	color: rgba(255,255,255,0.95);
    	-webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
    	box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
    }
    
    #adminloginform #wp-submit:hover {
    	background: #1e8cbe;
    	border-color: #0074a2;
    	-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
    	box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
    	color: #fff;
    }
    
    #wp-admin-bar-register a {
    	font-weight: bold;
    }

    Now changing the subject, I was wondering: why are most chat sessions being cancelled? Yesterday it was supposed to be 3, there was none; today it was supposed to be 4, and there was only that one with you. This sort of thing is becoming kind of a standard, as for most days in the week there has been at least 1 chat session that's pulled off. I'm asking so I can know what chat sessions will be on and what aren't, so I can organize myself better, and contact somebody else if there isn't going to be a chat session for that day.

    Thanks again. :slight_smile:

  • Wheel of Commerce

    Not sure if this helps, but I have another similar plugin in my installation, WordPress Admin Bar Improved, that gets perfectly inserted into the wp admin bar. The thing is: it's absurdly buggy; after pressing enter to log in, it freezes, then it takes a while to redirect to the home page, and when it finally does, it erases the content of the wp toolbar, in a way that you have to refresh the page to see it again. When the user inserts a wrong username/pw, it freezes again and then open a completelly misplaced panel showing a cutt-of from the old login page with the wrong username/pw message in it.

    Nevertheless, maybe you can find there a piece a code that would make my current login form get displayed horizontally?

    Also, Michael began to build a login form that would get inserted at my header. Even though what I want is a login form at the wp toolbar, since the design is similar, the code he gave me might help:
    https://premium.wpmudev.org/forums/topic/login-form-at-the-header-like-what-we-see-in-facebook-amazon-etc#post-837052

    Thanks again. :slight_smile:

  • Wheel of Commerce

    Hi!

    Since I'd have to spend money to fix the drop down login plugin I bought, and right now I'd rather focus my spendings on more important stuff (like implementing new functions in the site) , I've decided to stick with my old login form, at least for the time being. The thing is: /login, that has always worked perfectly, now is redirecting to /super-admin. I already re-saved the permalink structure, which didn't work. This happened right after a server downtime of 2h. Any ideas on how to fix this?

    Thanks.

  • Wheel of Commerce

    Basically /login is redirecting to the page below:
    http://www.wheelofcommerce.com/super-admin?redirect_to=http%3A%2F%2Fwww.wheelofcommerce.com%2Flogin%2F

    And again: it all started after a 2h server downtime; I didn't change anything, didn't add any plugin, changed any settings, nothing. When ther servers came up I went to check on the login page, because I was working on it, and it was like that.

    An interesting thing is that if I go to /login when I'm logged in as super-admin, I see the login page I was building, but the box where users insert the login data isn't there.

    Thanks again, guys. :slight_smile:

  • Jude

    Hey Gabriel

    And again: it all started after a 2h server downtime; I didn't change anything, didn't add any plugin, changed any settings, nothing. When ther servers came up I went to check on the login page, because I was working on it, and it was like that.

    You can try to flush permalinks as shown here
    http://tech.shawnlelle.com/resetting-wordpress-permalinks/

    Should get you back up and runnning

    Cheers
    Jude

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.