How to override sections in Hestia

If you are using a version of Hestia higher than 1.1.77 and want to change/override some of the sections in a child theme, you will need to use some hooks and filters.

In this document you will learn how to do that.

Step 1. Create a child theme for Hestia

In order to create a child theme for Hestia, please check this document. If you are not comfortable with that, you can just download a ready to go child theme from this document (see Method 1.) Make sure you download the proper version of the child theme, depending on which theme you are using, either Hestia or Hestia Pro.

Step 2. Use your own functions and the hooks defined in Hestia.

Now, assuming that you already have a Hestia child theme, depending on what you want to change in the child theme, you will have to add a code snippet like the one below, at the end of the functions.php file, within your child theme.

The code below is removing the Features section. 

function replace_the_features_section_with_a_custom_one() {
   /*
    * Remove the Features section using the corresponding hook
    * If you want to remove any other front page section, you would just change the hook, with the corresponding one, from the list in Step 3.
    */
   remove_all_actions( 'hestia_do_features_section' );

   /*
    * Add your own function instead for the Features section
    * Again, for replacing another front page section, you would just use a different hook
    */
   add_action( 'hestia_do_features_section', 'your_function_to_replace_features_section' );
}
add_action( 'init', 'replace_the_features_section_with_a_custom_one' );

/*
 * Your custom function for the new Features section
 */
function your_function_to_replace_features_section() { ?>
   <h1 class="text-center">This replaces the features section</h1>
   <?php
}

Step 3. Theme Hooks

Below is the list of all the hooks available in Hestia.

hestia_do_clients_bar_section
hestia_do_features_section
hestia_do_portfolio_section
hestia_do_pricing_section
hestia_do_ribbon_section
hestia_do_team_section
hestia_do_testimonial_section
hestia_do_about_section
hestia_do_blog_section
hestia_do_contact_section
hestia_do_shop_section
hestia_do_subscribe_section

hestia_do_header
hestia_do_footer

Can't find a hook you need? Get in touch with us, and we'll find a solution for you :)

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us