• Hi!

    I have an issue with the WordPress-toolbar since the upgrade to 5.3.1. I run a multisite and when a logged in user clicks on “My sites” and then on the site they want to visit, they are sent to their control panel instead of the site.

    How can I edit these links?

    Note: I don’t want to hide the toolbar completely (I see there are a lot of plugins that do that) – just that when a visitor clicks on a site they want to visit – they should get to the front-page of that site – nothing else.

    Please help. Thanks!

    (Unfortunately I can’t post a link to the site because it’s geo blocked.)

    • This topic was modified 6 years, 4 months ago by James Huff. Reason: moved to Networking WordPress forum since this is a multisite issue
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    If users roll over their site under My Sites, a submenu opens letting them go straight to the site’s home page instead of the dashboard. There could be several other options depending on their assigned role. They get the dashboard when clicking the site name because “dashboard” is the first submenu item.

    Admin bar items can be added and removed using WP_Admin_Bar methods
    https://codex.wordpress.org/Class_Reference/WP_Admin_Bar

    Thread Starter kingscrown

    (@kingscrown)

    Thank you, but are you saying that if “admin panel” was not the first submenu item, but instead the second, that would change how the site names are linked? In that case I want to change how they are ordered. Can you tell me how to do this? I find it very illogical that when a user clicks on the site name, they get the admin panel and not the home page. The only time I want users to go there is when they actually click on the submenu item that says “admin panel”.

    On another note, it seems that WordPress is a little to eager to send users to the admin panel at any time. By default users are sent there when logging in – instead of the actual home page. I’m pretty sure that most website visitors are more interested in the site content than the admin panel. When you login to Facebook, you are sent to your Facebook page. When you login to Netflix, you are sent to your movies and shows. But when you login to a site that is built in WordPress, you get an admin panel instead of the site content. I’ve found that this is confusing for users, but I have a plugin that takes care of the login issue, so this was just a side note.

    • This reply was modified 6 years, 4 months ago by kingscrown.
    • This reply was modified 6 years, 4 months ago by kingscrown.
    Moderator bcworkz

    (@bcworkz)

    The “go to first submenu item” behavior is true for the sidebar menu. I don’t know about admin bar items. I’m pretty sure you could get the each child node of “My Sites”, alter the target URL, then add it back in, replacing the original node. I’ve never done so myself, but in any case the solution lies in WP_Admin_Bar methods one way or another.

    When you add your callback to ‘admin_bar_menu’ action to do something with the admin bar, add with a large priority argument so your code runs after any other admin bar manipulation by other code.

    The “go to dashboard” login behavior is because normally users needn’t log in at all to utilize the front end. It’s only needed to administer something. Of course there are plenty of exceptions. WP cannot be all things to all people right out of the box. You can bet logins going to the home page would anger many people as well. Thankfully there are plugins that change things to our liking and there are plenty of hooks for devs to use in addressing almost any specific need.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Toolbar link issue’ is closed to new replies.