Header Logo Link

Hey there. I am trying to link the logo in my header to the home page of my website. How can I do this?

Hi There,

Could you please provide us with your website URL so we can take a closer look?

Thanks.

Hi There,

Your website is showing this text right now.

Could you please double check?

Thanks.

Yes that is what I am seeing as well. I tried entering a code in appearance<editor in attempt to link my header logo to the home page, and ended up with that.

Hi There,

Would you mind providing us with login credentials(by clicking on the Secure Note button at the bottom) so we can take a closer look? To do this, you can make a post with the following info:

  • Link login to your site
  • WordPress Admin username / password
  • FTP credentials

Thanks.

X Theme automates most of this process. To avoid “fighting” with the theme, I’d first remove the code you entered (that evidently broke your site) and do it the X theme way:

From your dashboard:
appearance>customize>header>LOGO – IMAGE and click “Select Image”

If it does not link to your homepage, you may not have defined a page as being your homepage. In that case, return to your wordpress dashboard and go:
settings > reading >Front page displays > *Static Page > select a page to be your home page

Hello There,

Thanks for providing the information. It turns out that you have modified your child theme’s functions.php file which has caused the text issue in your homepage. I have fixed it by reverting the contents to the original one which is this:

<?php

// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Overwrite or add your own custom functions to X in this file.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Enqueue Parent Stylesheet
//   02. Additional Functions
// =============================================================================

// Enqueue Parent Stylesheet
// =============================================================================

add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );



// Additional Functions
// =============================================================================

Please check your site now.

Thanks very much for your help!

Excellent. Works great. Thanks so much!

Glad to hear that. :slight_smile:

Hello there, I do have the same problem.

The logo header, points to the home page that has been password protected therefore I would like to link the logo header to a different page. How can I make this on my site ?
http://sjo-hokar.it
Thank you very much.
Best regards,
Roberto

Hey Roberto,

There is no option to point the logo to other pages. For this, you’ll need to hire a web developer to do the customization. You can show the developer about our customization best practices so he’ll know how to customize X. The file he’ll need to modify is _brand.php located in wp-content\themes\x\framework\legacy\cranium\headers\views\global

Thanks.

Hi, I’ve gone ahead and recoded the brand.php file to redirect to a certain page on my site but it doesn’t look like the change is working, is there anything I’m doing wrong here?

a href=“http://www.YourLinkHere.com” class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">

<?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>

Also, I had to take the < off the start of the code on here to make sure it looked right on my reply.

1 Like

Hi @hastingsdesign,

Thanks for writing around! Make sure your Child Theme is activated and your code doesn’t trigger any error. If nothing works then you can remove your customization and add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript

jQuery(document).ready(function($){
	$("a.x-brand").attr("href", "http://google.com/");
});

Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

1 Like