You need to remove the (!) infront of the conditional, you can read about PHP-operators here.
Now you simply say that if not on page “image-upload” remove the admin_bar.. Here is the working code:
<?php
function wpse_80018_hide_admin_bar() {
// If is on page "image-upload"
// Remove the admin_bar
if ( is_page('image-upload') ):
show_admin_bar(false);
endif;
}
add_action('wp_head', 'wpse_80018_hide_admin_bar');
?>
Just an example to understand the conditional:
<?php
function wpse_80018_test() {
// If iam on page "image-upload"
// Echo honey i'm home!
// If on another page echo "Working on another page!"
if ( is_page('image-upload') ) {
echo "Honey i'm home!";
} else {
echo "Working on another page!";
}
}
add_action('wp_head', 'wpse_80018_test');
?>
Related Posts:
- How to restrict dashboard access to Admins only?
- How to disable the “Post Lock/Edit Lock”?
- How can I control the position in the admin menu of items added by plugins?
- Check if user is admin by user ID
- Unable to login to my wordpress site. reauth=1 redirection loop
- wp_list_tables bulk actions
- Highlight custom widgets in the admin area?
- How do I find all admin users using phpmyadmin?
- Can I add custom attributes while adding inline scripts?
- create users to site with specific language
- Hide a page in the admin end without a plugin?
- Prevent from deleting any user role but subscriber
- Disable sticky posts feature
- Hide username from users list
- Remove HTTP: from the site URL and just keep // in it
- Prevent Admin gui output from page added using add_submenu_page
- Activating Child Theme Breaks Website, Blank Page, Error 500
- Create Read Only Admin
- wp-admin blank in a clean install of WordPress on PHP 5.4 [closed]
- wp-admin is redirecting to back to home page (localhost)
- How to use Yoast SEO backend in english even if WPLANG variable is not english?
- Rename W3 Total Cache admin menu
- Admin first hook that outputs HTML?
- WP Database Error (Windows Server 2008 & SQL Server)
- Cloned a site but can’t log in – redirecting to old site
- Can I edit the wp_post > post_content right before its inserted/updated?
- Should I add the IP of the server that hosts my sites to the list of authorized IPs in the wp-admin/.htaccess?
- wp-admin edit user url wont show up correct url [closed]
- Which HTTP headers to use for subdomain embedding?
- To remove default dashboard items and add quick draft widget for custom post type
- FORCE_SSL_ADMIN not working
- I get “The PHP Date/Time library is not supported by your web host.” on my CentOS host, what library to I need to install to add support?
- How can I allow core, plugin, theme update checks only for selected admins?
- wp_before_admin_bar_render action not working in back office
- Can’t access WordPress as an admin – but I can log in as a user!
- Can enter wp-admin when logged in with custom ajax
- Locked Out Of WordPress Admin Dashboard After Server Move
- admin_post action not usable if admin access denied to user
- Can’t log into wp-admin after migration from localhost to server
- Display checked in checkbox theme admin page when reloaded
- Why is unfiltered_upload not working despite being enabled?
- List All Enqueued Scripts and Styles
- Add menu option to “New Post” menu in admin bar
- Linking table cells to network folders
- Remove bulk option row
- Admin menu in front-end
- How can I disable all external url Google in WordPress backend?
- if it possible to get all notifications from all plugins and core?
- wp-admin page redirecting to 404 error page
- Require Login Redirect to Login Page
- ASCII to Unicode conversion and then save the data into database using WP post editor field
- How to fix ob_end_flush() failed to send buffer of zlib output compression (1)?
- How to replace “Password Protected” text with icon in Admin
- 100+ terms in any taxonomy slows down post updates?
- Is WordPress Suitable for my site?
- Disable or lock parent pages from being edited in wordpress admin
- How login is possible, if I deny login page via .htaccess with allow ip
- Unable to display WordPress admin bar in the frontend as an admin
- Delete the “wp-admin” folder – what could go wrong?
- unsuccessful attempt to change domains- wordpress re-routing to old domain
- How can I limit page parent dropdown to show only author’s own pages?
- Nickname field isn’t appearing in Admin
- Icons are missing from Visual Editor
- how can provide access to wp_admin page for non wp_users?
- Creating custom admin panel pages without making a plugin?
- jQuery UI Datepicker error
- Change users.php WP_User_Query
- Can’t connect to WP-Admin, blank error message
- Blank page when viewing wp-admin
- Is it possible to display my theme sidebar in wordpress admin?
- Can’t access wp-admin after http to https change
- Programtically selecting image URL in Media Library modal
- wp-admin: “Sorry, you are not allowed to access this page.”
- How to access wordpress from domainB which is installed at domainA
- How to optimize the opening speed of admin panel?
- WordPress /wp-admin redirect to wrong port in docker
- How to change the URL of sub menu page?
- Change wordpress admin home page
- Strange wp admin edit buttons issue
- Cannot access wp-admin after migration to another place
- Regular users logs in as ADMIN if Admin logged in recently
- Enable Excerpt field inside the post editor for pages
- How do I fix the 403 error for wp-admin/admin-ajax.php?
- Strange Popup Ad on my WordPress Admin Dashboard
- Trying to list user and post information from (wp_includes/post.php ) causes Fatal error
- Unable to Add User after Site Migration
- Not able to access WP admin Page, redirected and a drop down login menu appears 401 error
- OSX El Capitan local install Maximum upload file size: 2 MB But php.ini set to 64M
- Get Post ID in Admin Edit screen otherwise generate it?
- Cannot login in WordPress even after changing hash password in phpmyadmin
- WordPress User profile page fields missing
- Is it possible to outsource wp-admin to another server?
- Wp mwnu not works at all
- Trying to use and understand JSON API and get_posts
- Search box for hierarchical taxonomies in admin interface
- Custom Admin Message from external source to multiple users
- Customize a WP_Posts_List_Table class
- I want to know if it’s good for SEO [closed]
- Help please i cant login to wordpress panel [closed]
- Https Website: CSS and JS files load in http and admin page does not load too