How to Customize the Header Globally?

Trying to make a custom div in the header area but not really sure what the best method is?

  1. Hard code a div into child them within the “page.php” file

  2. Use the action hook (not really sure how these work)… I tried the following both in the page.php file and also in the customizer code input, but neither seems to work correctly. The code I tried using was

function my_after_top_bar() {
    echo '<div> I am right after the top bar div. </div>'; 
add_action( 'fl_after_top_bar', 'my_after_top_bar' );

Is there another option I’m missing? I really wish the BB had an easier way to customize header as I’m really out of my depth when it comes to PHP. HTML/CSS I can sort of handle.

Hey Jason,

Either way works fine, it all boils down to personal preference. I’d prefer to use the action hooks if possible so all changes can be seen in one place.

Also, the code above goes to your child theme’s functions.php file. :slight_smile:


Thanks Ben. Does it matter what order the action hooks are placed in the functions.php file?

Not really sure about the question. Are you planning on hooking to several action hooks? And wondering if the order matters? If so, then it doesn’t. :slight_smile:


Thanks Ben, that answers my question

Hi Jason,

Happy to hear your issue has been resolved and thanks for informing us. We appreciate it.