Your code is simply stating CSS properties, but they aren’t defining anything. They’re not attached to any HTML tag, class, or ID.
Assuming your “mycustomurl” is a placeholder here for an actual URL that resolves to an image file, I would think that what you want is for these properties to be for the HTML <a>
tag under <h1>
in the div ID “login”:
function my_custom_logo(){
?>
<style type="text/css">
#login h1 a {
background-image: url('mycustomurl');
height: 65px;
width: 320px;
background-size: auto;
background-position: center center;
background-repeat: no-repeat;
padding-bottom: 30px;
}
</style>
<?php
}
add_action('login_enqueue_scripts', 'my_custom_logo');
Related Posts:
- Unable to login and wp-login.php redirects to wp-admin%2F&reauth=1?
- Change Login URL Without Plugin
- Replace wordpress login logo with custom text
- Using /wp-admin works, using /login gives a 404. Why?
- FORCE_SSL_ADMIN not working
- Use Password Protected Form without the use of wp-login.php
- wp-admin – 404 after custom login form
- How to fix ‘WordPress redirection loop problem in wp-login.php page’?
- WordPress server change – slow admin login time for first time
- White screen of death for wp-admin and error for wp-login.php after entering credentials
- Blank page for wp-admin after i uploaded the website from my localhost to the live server
- How to set where user is redirected to after logging in at wp-login?
- Why can I log into wp-login.php and not wp-admin.php?
- Disable Admin CP authentication (or auto login)
- When i try to open Localhost/wordpress/wp-admin . An Error appears ” Registration Has been Disabled” . No login page is shown in the browser
- Launch wordpress site to local computer from live website backed-up
- WordPress site shows a white page for site/wp_admin. A login returns again to the login screen
- Changing the ‘wp-admin’ URL to whatever I want
- Unit testing in the WordPress backend (is_admin() is true)
- How to display a static HTML page while setting up a WordPress site?
- How can I uninstall a language?
- Best way to present options for home page in admin?
- How can I improve the line break handling in the WYSIWYG editor?
- How do I change the login logo URL and hover title?
- Delete Post From front Page ( With Wp-admin restriction )
- Custom user role that can only edit specific (non-custom-type) page and all child pages [duplicate]
- Add mass action to wp-admin/users.php
- Only allow administrators and editors to access wp-admin
- Add button in TinyMCE editor to insert text
- Can you change the main heading of a page in the WordPress admin (without output buffering or JavaScript)?
- wp-admin – save options without refreshing?
- How to get the password and username of the add new user form (admin back end) in wordpress
- WordPress Error establishing a database connection For Admin login only
- How do you modify CSS files via admin panel?
- Image editing: “Edit Original” and “Replace” buttons missing on old posts
- WooCommerce – filter by featured products in admin
- How to prevent parent admin page from appearring as a child admin page
- How to clone wp-admin and make a new dashboard controlled by your code?
- What is an “Options Framework” for WordPress
- show/hide toggle for subpages in wordpress admin area
- Additionally added URL params leading to “Invalid post type.” in the Admin Panel
- After login get “403 Forbidden”
- How to display a Ninja Form on the WordPress admin pages
- Why are my frontend theme styles bleeding into the backend?
- Show Welcome Panel on Dashboard for every user
- Is it possible to add an item the Post Publish panel?
- Uncheck the box “Send User Notification” by default on new-user.php
- Detecting all admins that are logged in
- WordPress Options Page not working
- Admin account locked out/redirect loop. Other accounts work?
- Add count for new registered user in Users tab
- How To Differentiate Drafted product and Publish Product through Color?
- WP admin page gives 404
- How to prevent the editor from redirecting to website within iframe?
- An update has caused my client’s site to be non-existent after new update of WordPress [closed]
- White screen of death in Dashboard after clean installation
- WordPress (admin) posts search GET request filter
- wp-admin throwing 500 errors after update to 4.2.1
- How do you force the wordpress dashboard to be 1 coulmn by default?
- Migrated wordpress site give “Undefined variable: php” warnings
- Add and Remove Row Actions in an Existing WP_List_Table
- I am unable to login into my wp-admin
- Is it possible to take over a WordPress site if the old administrator is MIA?
- How can I prevent redirects from mysite/page to mysite/wp path/page?
- How can I prevent a function from loading in the admin screens?
- Add styles to wordpress admin on the Page List
- making users.php search include a specific user meta data field without messing with the SQL query itself
- Redirect an entire WordPress site on a subdomain, except wp-admin
- WordPress Admin Toolbar Disappeared when moved site to subfolder
- Admin sometimes redirects to HTTPS
- WP Core hard coded to use http://www.w3.org/1999/xhtml not HTTPS
- Hide user group filtering links
- Fix Admin Dashboard Posts tab
- Add a custom field when adding / editing a page / post in admin panel
- View all comments on post one click
- wordpress wp-admin/includes/shema.php file has been modify alone
- Broken Customizer page
- I can’t access my wp admin dashboard
- wp-admin going directly to 404
- Weird white space in admin area
- How to logout the current user without notices and warnings?
- Updated to wordpress 5.5.1 doesn’t work
- How can I change block editors suggested links to display another url (i.e. from api.mysite to www.mysite)
- How to change labels in the projects page
- Can’t access Network Admin dashboard in wp-admin
- wp-admin won’t load for users behind a Barracuda F600 firewall
- WordPress wp-admin login problem
- Failed to load resource: the server responded with a status of 431 ()
- Database problem
- WordPress Admin Page Redirecting to Subdomain
- Disabling WP-Admin Caching in htaccess
- Unable to log in as admin
- Add files to wordpress admin panel footer
- Can I rename the wp-admin folder?
- Why WordPress not logout after I have close my browser?
- Images on admin backend not showing up
- How to troubleshoot 404s in WordPress admin
- wp-admin won’t “remember me” in Chrome & Firefox
- Why when I click on a link into the WP admin panel I am redirected to a link that doesn’t contains wp-admin prefix, so I obtain 404 error
- Cannot Access wp-admin