WordPress.org

Ready to get started?Download WordPress

Forums

Hiding Toolbar when not logged in (8 posts)

  1. gnjuser
    Member
    Posted 2 years ago #

    I would like the Toolbar to be completely hidden on the "public" side of my website for both logged-in users and non-logged-in visitors to my site.

    Currently, despite having updated the profiles for named users to not "Show Toolbar when viewing site", I can still see it poking out to one side behind the menu which is at the top of my page.

    Looks like this option actually leaves the Toolbar there but just displays the remainder of the page over the top of it.

    Can anyone please advise me on how to really hide it.

    I am sure this must be possible, eg.....

    It can't be turned off in the dash because it is the dashboard header. It can be turned off on the live site because you're not in the dashboard, so you don't *need* the header.

  2. varunms
    Member
    Posted 2 years ago #

    which tool bar u need to hide

  3. gnjuser
    Member
    Posted 2 years ago #

    The one that used to be called the Admin bar

  4. varunms
    Member
    Posted 2 years ago #

    past the below code in functions.php

    the admin bar will not show

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  5. gnjuser
    Member
    Posted 2 years ago #

    Thanks.

    I've tried but it's made no difference.

    I'm using a child theme to Twenty Eleven and so I pasted your code into the child's functions.php. Presumably this should work OK?

  6. varunms
    Member
    Posted 2 years ago #

    try pasting that code in main theme functions.php file and use the main theme

    just try it

  7. gnjuser
    Member
    Posted 2 years ago #

    OK, so it's now gone from the Dashboard, but I can still see it as described above on the "public" side of the website.

    Any ideas?

    Thanks for your support, btw :-)

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the Twenty Eleven theme to rule out any theme-specific problems.

Topic Closed

This topic has been closed to new replies.

About this Topic