Editing Core Files erases changes when BB is updated

Dear Team BB,

I am specifically trying to change the “fixed header” URL to something other than the home page of the website. However, the only way I was able to do this was to edit the fixed-header.php file under “Appearance > Theme Editor”.

Problem is, when BB is updated it over-writes all my changes.
Please advise
Thanks
Hilton

Hi Hilton,

You can use a child theme and copy the header layout you’re using to your child theme. For example, if you’re using the Nav Right header layout you can copy the nav-right.php file from the BB Theme /includes/ folder and add this to your child theme’s /includes/ folder (if includes doesn’t exist, simply create it).

Once you’ve added the nav-right.php file to your child theme’s includes folder. You can open that file and edit it however you like this includes changes/adding your own URL.

In that file you will see the following:

<div class="<?php FLLayout::col_classes( array( 'sm' => 6, 'md' => 6 ) ); // @codingStandardsIgnoreLine ?> fl-page-header-logo-col">
  <div class="fl-page-header-logo"<?php FLTheme::print_schema( ' itemscope="itemscope" itemtype="https://schema.org/Organization"' ); ?>>
    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" itemprop="url"><?php FLTheme::logo(); ?></a>
       <?php echo FLTheme::get_tagline(); ?>
   </div>
</div>

You want to change this:

<a href="<?php echo esc_url( home_url( '/' ) ); ?>"

with:

<a href="https://myurl.com"

If you’re not using Nav Right but another layout then copy the file for the layou you’re using.

Hi and thanks for the reply.
Please bear with me, I have never used a child theme. How would you explain what a child theme is and why would someone consider using it? (in laymans terms)

I actually have this child theme. I installed, activated it and it changed a lot of elements across the website.
Does this mean I must copy certain files from the main theme over to the child theme somehow?

Hilton

You can learn more about a child theme from link below.

Your site looks different because your theme settings aren’t copied over from the parent to child so you will need to configure it again or use our customizer import/export plugin. :slight_smile: