I am trying to develop a Wordpress Plugin (to develop my skills) that allows a user to customise their Wordpress login page.
I have a settings page where the user can choose to replace the Wordpress logo. However, I cannot call this option correctly from the database. I have read about string concatenation and nesting php tags but I cannot get this function to work.
<?php
$bglogo = get_option('background_logo');
function custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image: url(.$bglogo.) !important; }
</style>';
}
?>
I have tried the below without success:
background-image: url(".$bglogo.") !important;
background-image: url('.$bglogo.') !important;
Is it possible the problem is the style tags?