Editing Footer using a child theme
-
Hello,
I am trying to add a fourth widget area to the footer. I managed to make it work when editing the parent theme directly by changing hestia_nr_footer_widgets in the class-hestia-footer.php from 3 to 4 which to worked perfectly and I created the extra widget area to use.
private function the_sidebars_class() { $number_of_sidebars = get_theme_mod( 'hestia_nr_footer_widgets', '4' ); if ( empty( $number_of_sidebars ) ) { return 'col-md-4'; } $suffix = abs( 12 / $number_of_sidebars ); $class = 'col-md-' . $suffix; return $class; }Wiget code in the function.php file
if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => 'Footer Four', 'id' => 'footer-four-widgets', 'description' => 'Place Your Widgets Here', 'before_widget' => '<div id="footer-four-widgets-4">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>' )); }But when I tried to do the same changes with the child theme it does not want to use the child theme footer at all even when I copied the whole inc, assets, Gutenberg, and template-parts folders into the child theme directory also copied the footer.php child theme directory. The only time that I manage to make the child theme use its own footer is when I write HTML code and remove the
<?php do_action( 'hestia_do_footer' ); ?>from the footer.php file.I was wounding if there is a way to keep the current footer but add an extra wight area into the footer?
The page I need help with: [log in to see the link]
The topic ‘Editing Footer using a child theme’ is closed to new replies.
