Thange header content


I would like to make some modifications to the Travelify header contents, mainly I would like to show both the site logo and site name, and some other little tweaking.

I have the necessary php and css knowledge, and I have found that the code responsible for the contents of the header is in travelify/library/structure/header-extensions.php. I would like to ask, what is the best way to edit this in a child theme? Create the same file in the child theme and edit the code there, or create some hook in the functions.php file?

Thank you very much!

The best options is to create action hooks via Child Theme Functions.

For example to add search form in header you could use function like this

// Custom Search in header via Child Theme functions.php
add_action( 'travelify_header', 'my_custom_search' , 5 );

function my_custom_search() {

Or to add custom text you can use something like this

// Add new text in header info
add_action( 'travelify_header' , 'new_header_info' , 10 );
function new_header_info() {
   $output = '<div class="custom-text">Your new header information</div>';
   echo $output;

This way to can do anything with header area and will be still able to update theme without losing customizations.

Thank you very much!

This solves my problem! One additional question: I am thinking that I would like to change the site title and description part’s working in the header, so I am thinking, I would need to completely turn off the theme’s original function that is hooked to that. Because if I don’t do so, there are 2 header info blocks appearing, one is the original from the theme, and the other one is mine. Is that possible?


I guess it would be easier than trying to mix things together.

Getting rid of travelify_headerdetails and then bringing writing your own code on top of that would be easier. Since you can just copy/paste most of the code and add your own code around site-title and description.

Have fun tweaking! :slight_smile: