Linking unique header logo to different url

Hi There,

I’ve successfully used this forum thread to create multiple one page navigation headers with unique logo images.

However, I’d like the unique logo image on one of these pages to link to a new url (not within my site). I’m wondering if there is any additional custom JS I can add to the jQuery below (from the original forum thread) to make it so that clicking the header logo links to a new url, rather than to my homepage :

jQuery(document).ready(function($){
$(".page-id-45 .x-brand img").attr(“src”, “http://your/new/logo.jpg”);
});

Thanks!

Hi Courtney,

Thanks for writing to us.

The code you mentioned will change the logo image source for the specific page.
To change the link for the same you need to add the following code into the JS section of the specific page or in Theme Option.

I would also like to suggest you upgrade the X to Pro theme to have different customized header options for each page.
Please read this article to upgrade [https://theme.co/docs/converting-from-x-to-pro]

jQuery(document).ready(function($){
$(".page-id-45 .x-brand").attr("href", "http://your/new/logo.jpg");
})

Remember that the above code will work if copied as it is and don’t conflict with any existing code.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We do not provide support for custom codes that means we can’t fix it in case it conflicts with something in your site nor will we enhance it.

Hope it helps.

This worked great, thanks so much!
In regards to pro, I’ve tried upgrading a few times and it seems to break a few features on my site. I will look into the article you provided and see if I can figure out how to upgrade successfully.

Thanks!

Hi Courtney,

Happy to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.