Override “before_title” for footer widget
-
Hi,
I am trying to override ‘before_title’ & ‘after_title’ setup of my widgets in footer. Unfortunately, no luck here.First of, I’ve tried a snippet from official site (https://wpastra.com/docs/change-sidebar-widget-title-heading-tag/), which I’ve placed in functions.php for my astra child theme. No luck, no change.
Then, I’ve tried to override whole sidebar initialization thanks to github code I found. Once again, I’ve added following to functions.php in child theme:
if ( ! function_exists( 'astra_widgets_init' ) ) { function astra_widgets_init() { /** * Register Footer Widgets area */ unregister_sidebar('advanced-footer-widget-1'); register_sidebar( apply_filters( 'astra_advanced_footer_widget_1_args', array( 'name' => esc_html__( 'Footer Widget Area 1', 'astra' ), 'id' => 'advanced-footer-widget-1', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget-title">', 'after_title' => '</h6>', ) ) ); unregister_sidebar('advanced-footer-widget-2'); register_sidebar( apply_filters( 'astra_advanced_footer_widget_2_args', array( 'name' => esc_html__( 'Footer Widget Area 2', 'astra' ), 'id' => 'advanced-footer-widget-2', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget-title">', 'after_title' => '</h6>', ) ) ); } }
(I need to update just two bottom widgets in footer).
So.. so long, no luck. Can I count for a support here?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Override “before_title” for footer widget’ is closed to new replies.