Editing the main logo link

Hi there,

Long story short, we built a microsite for a client using a separate install of WP. We’d like to have the main logo of the microsite link to the main website. Essentially, the ask is, “how do I customize the link that the logo goes to?”

I’ve seen a couple posts about it, but they point to a _brand.php file in framework–>views–>global. That file doesn’t seem to be in that structure anymore, so I’m not sure I can follow those instructions.

Are there updated instructions I could use?

Thank you very much!

Hi There,

Thank you for writing in, the file _brand.php is now moved on \x\framework\legacy\cranium\headers\views\global directory. Copy it to your child theme and do your modifications there.

This is the line that output the home URL <?php echo home_url( '/' ); ?>
Replace that manually with your client’s main website URL.

Cheers!

Thank you! I found the file and edited the appropriate line, but my logo is still linking back to the homepage. Here’s the code:

<?php

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

$site_name        = get_bloginfo( 'name' );
$site_description = get_bloginfo( 'description' );
$logo             = x_make_protocol_relative( x_get_option( 'x_logo' ) );
$site_logo        = '<img src="' . $logo . '" alt="' . $site_description . '">';

?>

<?php echo '<h1 class="visually-hidden">' . $site_name . '</h1>'; ?>

<a href="https://collegesuccessarizona.org/" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
  <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
</a>

Any suggestions?

Hi There,

Please confirm that you correctly created the same path to your child theme /x-child\framework\legacy\cranium\headers\views\global, and correct name of the _brand.php file, (not _brand.php.txt)

Also clear all your caching plugins/features that the site might have and clear your browser’s cache too.

And see to it that your child theme is active.

This snippet has been confirmed to work with X out of the box, but there could be conflicts with any other customization or plugins you have in place, reconciling these changes gets into custom development, which is outside the scope of support we can offer. You may wish to consult a developer to fully implement this for you.

Thank you.

Thank you. Here’s the setup; I have the location right, no?: https://www.evernote.com/l/AO4Vu5_c7QtNSLvfIcry-gG71g701-di3HY.

I’ll start looking for a plugin conflict.

I appreciate the help!

Hello @jstovallcollaborativ,

Thank you for writing in! I have just followed up on this and tested locally and can confirm the following path should yield and overwrite for you:

x-child/framework/legacy/cranium/headers/views/global/_brand.php

However, simply placing the file at the old location before it was migrated should work as well:

x-child/framework/views/global/_brand.php

You can find this old path by looking to the top of the migrated files, and you will always see something on in the first 3-5 lines that looks like:

VIEWS/GLOBAL/_BRAND.PHP

If you take that pathname (lowercase) and follow it by placing it in x-child/framework/ as shown above, you should also receive an overwrite from that (the migration view system tries to be as forgiving as possible).

Hopefully that helps to point you in the right direction, cheers!

Hi there, I don’t know… I have tried putting the file in both places and it’s not taking. I also updated it in the “main” X directory, just to give it a try.

Any other ideas?

I understand if not. Thank you for your continued help!

Hi there,

Would you mind providing your admin and FTP details in a Secure Note so that we can check it?

Thank you.

Added. Thank you very much!

Hi there,

I checked the files and it seems the file is added in the correct place.

Would you please kindly make sure that you purge all possible caches on your Wordpress dashboard?

Give us the URL/User/Pass of your wordpress dashboard too to follow up the case.

Thank you.

Hey Christopher, I’m giving you the login for production in the following secure note. Thanks!

Hi there,

None of this customization is added to your site. There are only functions.php and style.css in your child theme.

I went ahead and implemented all of that and it works.

Thanks!

Thank you!

I’m not sure why those modifications weren’t in there. I’m trying to figure out if I was FTPing into staging or something.

Apologies for any confusion I created. Thank you, again, for the great support!

You’re most welcome!