Change default link in header logo

I’m trying to change the page link that the logo image in the header defaults. I found this code in the bbtheme/includes/fixed-header.php file:
<a href="<?php echo home_url(); ?>"><?php FLTheme::logo(); ?></a>

Assuming this is what I change, but I don’t want to change it in the bbtheme. I would rather change it in the bbchildtheme I’m using, or in the code section of the BB Theme customizer. How to I change this?

THANKS!!

Hi Anne,

To do this you’re going to want to use the BB Child theme available from your My Account page. You will also want to download the BB Theme as well, I will explain why in a moment.

Once you have downloaded, install the child theme like any other WordPress theme and activate it. Now connect to your server via an FTP client and navigate to /wp-content/themes/bb-theme-child.

Whilst that directory create a new folder called “includes” (without quotes). Now extract the BB theme you downloaded, like I mentioned above and open the includes folder in the BB Theme directory.

You should see a bunch of files, you will want to copy the following files (depending on your header layout option) somewhere on your computer like your desktop:

  • fixed-header.php
  • nav.bottom.php
  • nav-centered.php
  • nav-right.php

Now open all the files in a code editor and replace <?php echo home_url(); ?> with your preferred URL in each of the files. So you get something that looks like this:

<a href="http://forum.wpbeaverbuilder.com"><?php FLTheme::logo(); ?></a>

Save the changes and upload these files to /wp-content/themes/bb-theme-child/includes/. Your BB child theme directory should now look something like this:

bb-theme-child
|_classes
|_includes
    |_fixed-header.php
    |_nav-bottom.php
    |_nav-centered.php
    |_nav-right.php
|_functions.php
|_screenshot.png
|_style.css

Once the files have been uploaded, refresh your page and your logo image should now be the custom one you added to those files.

Thanks,
Danny

Cool thanks! I already had the child theme active, but it didn’t have the “Includes” folder, so I created it. Now my only question is do I remove the 'itemprop=“url”> from the code in the nav-center, nav-right and nav-bottom files?

<a href="<?php echo home_url(); ?>" itemprop="url"><?php FLTheme::logo(); ?></a>

Hi Anne,

You shouldn’t need to, you can leave it if you like.

Thanks,
Danny

When I left it it showed up on the header in my site. Is it going to cause issues if it’s removed?

Hey Anne,

That part shouldn’t show up in the markup. Do you think you can share the URL of the site in question along with temp admin access so we can check?

Ben

So I started over and now everything is fine. I think I must have accidentally touched on some of the other code or something, which is why it was showing 'itemprop="url"> text in my header.

All is working great! Thanks so much! You guys are awesome, as always.

Hey Anne,

I was thinking the same thing! Anyway, good to hear you got it to work. Have fun with BB! :slight_smile:

Ben