Skip to content

How to override sections in Hestia ​

To change or override some of the Hestia sections in a child theme, you need to use hooks and filters. This guide shows you how to do that.

In this article

Step 1. Create a child theme for Hestia ​

To create a child theme for Hestia, follow the guide to creating a child theme for Hestia. If you are not comfortable with that, you can download a ready-to-go child theme from the same guide (see Method 1). Make sure you download the right version of the child theme for the theme you use: Hestia or Hestia Pro.

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

Once you have a Hestia child theme, add a code snippet like the one below at the end of your child theme's functions.php file. The exact snippet depends on what you want to change.

The code below removes the Features section and replaces it with your own function.

php
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 the main section hooks you can override in Hestia.

text
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

If you can't find the hook you need, contact Themeisle support for help.

Was this helpful?