I have the following piece of code in a php file on my wordpress site which defines how the logo will appear and work. How would I make a command to change the URL from home to a URL I define based upon being on a different page. In this example I want to change the URL from home to my blogs post page if you are viewing the logo from a blog post (single.php). If you are viewing the logo from any other page other than a post the logo will continue to link to the home url using the below code.
<a href="<?php echo home_url(); ?>" class="<?php
echo esc_attr($header_logo_class);
when_match($use_uploaded_logo, 'logo-image', 'logo-text');
?>">
Any help would be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire