Adding an Image Map to Logo Image

My client had a very old side where her logo didn’t have a URL but had a image map that was activated from a BOOK NOW hotspot on the logo itself.

I am trying to update the site using X theme but the client would like to have the logo with the image map back in the header. I created a new image map.

I have the image map code saved in the custom css section of the theme and the logo is already uploaded into the header. How do I remove the URL that comes standard with the logo and replace it with the image map details so the Book now Icon works in the header. Thank you.

ps: the server is currently being updated and the fill domain is not fully attached to the server currently until the site is finished. However putting in the www. will bring the site up other wise you will get the old one. Where the logo is very small at the top of the page. Thank you

Hello Drew,

You can may override the header template use by X through the child theme.

Then you can login through FTP and go to wp-content/themes/x-child then create the follow directory path framework/legacy/cranium/headers/views/global then create the file _brand.php in the global directory. Edit the file and add this code:

<?php

// =============================================================================
// VIEWS/GLOBAL/_BRAND.PHP
// -----------------------------------------------------------------------------
// Outputs the brand.
// =============================================================================

$option_logo_text = x_get_option( 'x_logo_text' );
$option_logo_src  = x_get_option( 'x_logo' );
$logo_text        = ( empty( $option_logo_text ) ) ? get_bloginfo( 'name' ) : $option_logo_text;

if ( empty( $option_logo_src ) ) {
  $logo_output = $logo_text;
} else {
  $logo_src    = x_make_protocol_relative( $option_logo_src );
  $logo_output = '<img src="' . $logo_src . '" alt="' . $logo_text . '">';
}

if ( x_get_option( 'x_logo_visually_hidden_h1' ) ) {
  echo '<h1 class="visually-hidden">' . $logo_text . '</h1>';
}

?>

<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>">
  <?php echo $logo_output; ?>
</a>

Make you changes in this block of code above:

<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>">
  <?php echo $logo_output; ?>
</a>

Kindly note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates. If you are uncertain how to proceed, it would be best to get in touch with a developer.

Hope this helps.

I managed to get it to work perfectly. I had to remove the logo I put in the XTheme Customize - Header - Logo Image then the code worked brilliantly,

Thank you very much!

Hey Drew,

You are most welcome! It’s good to know that you have manage to remove the logo from the X Theme Options and that the code works out for you. If you need anything else we can help you with, don’t hesitate to open another thread.

Cheers.

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