0

On the page /wp-admin/edit.php there is some buttons on the top bar "website name" "add" and "show post" i want to hide these buttons completely. How would i go about doing that?

Showing the buttons i'm talking about

  • Those do not look like standard WordPress controls. Do you have a page builder of some kind installed? – Jacob Peattie Jun 1 '19 at 13:02
0

So a straight forward way to do this is to use CSS if you want to pick out a few items to not display on the admin. These items you've provided look like the standard menu items with a different style attached, though I can't be sure. If not, you'll need to provide more clearer info

For example, the CSS to use to hide the 'name', 'add', and 'show post' links, is:

#wp-admin-bar-site-name,
#wp-admin-bar-view,
#wp-admin-bar-new-content {
    display: none;
}

There would probably more involved ways to achieve with code snippets, but you can try this for now.

If you don't have a way currently for easily customizing your WP Admin CSS styles, you can simply copy-paste this code below and put it straight into your theme's functions.php file.

        add_action( 'admin_print_styles', function () {
            echo '<style>
                #wp-admin-bar-site-name,
                #wp-admin-bar-view,
                #wp-admin-bar-new-content {
                    display: none;
                }
            </style>';
        } );

Each of the lines that begins with wp-admin-bar- represents the ID of an HTML element on the page. To hide other elements you need their IDs. And to get their IDs, you can use your browser's inspect functionality, find the ID, and create a new line in the code for your extra ID.

I've attached a little screenshot that makes this obvious how to do it.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.