Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

logo

WordPress login page logo customization

get_stylesheet_directory_uri() is a PHP function, you must use it in a PHP file instead of your CSS file. In your functions.php you can paste this code and change depends on your needs: function my_login_logo() { ?> <style type=”text/css”> body.login div#login h1 a { background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/Logo-B-Classic.jpg); } </style> <?php } add_action( ‘login_enqueue_scripts’, ‘my_login_logo’ … Read more

Categories images Tags images, login, logo, paths

Changing Login Logo

If you are using a child theme then maybe you should try the following code. Not necessary to put !important too unless some other plugin or code is overwriting it. function custom_loginlogo() { echo ‘<style type=”text/css”> h1 a { background-image: url(‘. get_stylesheet_directory_uri().’/images/login_logo.png); } </style>’; } add_action(‘login_head’, ‘custom_loginlogo’);

Categories login Tags login, logo

What flex-width/height does?

flex-width stands for flexible width and flex-height stands for flexible height <?php // Previous function code here $args = array( ‘default-image’ => get_template_directory_uri() . ‘/assets/images/default-image.jpg’, ‘default-text-color’ => ‘000’, ‘width’ => 1140, ‘height’ => 250, ‘flex-width’ => false, // Now width are fixed to 1140 px ‘flex-height’ => true, // Height is adjustable ); // Later … Read more

Categories theme-development Tags add-theme-support, logo, theme-development

Replace admin bar logo

That’s controlled by a Dashicon (font icon) and a before statement: #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before { content: ‘\f120′; top: 2px; } What you’d want is to replace the content call. Use a built in Dashicon from here: http://melchoyce.github.io/dashicons/ So the smilie would be content: ‘\f328;`

Categories admin-bar Tags admin-bar, logo

How do I enable the customize theme page to accept svg’s?

You’ll also need to add “svg” to the list of valid extensions in WP_Customize_Image_Control: $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ‘themeslug_logo’, array( ‘label’ => __( ‘Logo’, ‘themeslug’ ), ‘section’ => ‘themeslug_logo_section’, ‘settings’ => ‘themeslug_logo’, ‘extensions’ => array( ‘jpg’, ‘jpeg’, ‘gif’, ‘png’, ‘svg’ ), ) ) );

Categories uploads Tags logo, svg, uploads

Change logo url link

The login_headerurl filter is for changing the logo url of login page, according to the Codex. To change the logo URL of your homepage, you will have to look into your theme’s header.php file. You logo and it’s link are included there. Depending on your theme, they way that your URL is generated may be … Read more

Categories urls Tags links, logo, urls

How do I handle the “WP_Customize_Cropped_Image_Control” callback?

I think you add for each logo a settings field? If no, please enhance your question. If yes, then add also often the call for the cropped image control. The follow example add an section, an field for a logo option and get the possibility for cropping image. add_action( ‘customize_register’, ‘fb_logo_customize_register’ ); function fb_logo_customize_register( $wp_customize … Read more

Categories theme-customizer Tags logo, theme-customizer

How to change get_custom_logo() url?

I solved using this filter: add_filter( ‘get_custom_logo’, ‘custom_logo_url’ ); function custom_logo_url ( $html ) { $custom_logo_id = get_theme_mod( ‘custom_logo’ ); $url = network_site_url(); $html = sprintf( ‘<a href=”https://wordpress.stackexchange.com/questions/232174/%1$s” class=”custom-logo-link” rel=”home” itemprop=”url”>%2$s</a>’, esc_url( $url ), wp_get_attachment_image( $custom_logo_id, ‘full’, false, array( ‘class’ => ‘custom-logo’, ) ) ); return $html; }

Categories theme-development Tags logo, theme-development

How to remove the WordPress logo from login and register page?

You can add a filter to login_head. As explained in the Codex, add this to your code: function my_custom_login_logo() { echo ‘<style type=”text/css”> h1 a {background-image:url(http://example.com/your-logo.png) !important; margin:0 auto;} </style>’; } add_filter( ‘login_head’, ‘my_custom_login_logo’ );

Categories login Tags login, logo, user-registration

Multiple image logo for theme

I am assuming that by online and offline you mean active states of the logo. I think there are several options for you to use. The first two options can be used within your theme and then are simply changing the image file within the directory. Option One (not using WP): You can utilise a … Read more

Categories themes Tags logo, themes
Older posts
Newer posts
← Previous Page1 … Page11 Page12 Page13 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress