image from child theme specified in parent theme functions.php
-
I have developed a parent theme which will be reused across several sites, each with a custom child theme. I want a login logo for each site which will use a graphic in the images directory in the child theme.
I have included the following in my functions.php of the parent theme:
<?php // ===== ADD CUSTOM LOGO TO LOGIN function my_custom_login_logo() { echo '<style type="text/css"> h1 a { background-image:url('.get_bloginfo('template_directory').'/images/login-logo.png) !important; } </style>'; } add_action('login_head', 'my_custom_login_logo'); ?>
However this only works if the login-logo.png is located in the parent theme, but this is not my goal as I want to use a different login-logo.png graphic for each site from the child theme. How can get the functions.php to pull in the graphic from the child theme rather than the parent?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘image from child theme specified in parent theme functions.php’ is closed to new replies.