Hi, I need to change the Main Sidebar widget headings from <h4 class="h-widget"></h4>
to <h3 class="h-widget"></h3>
like found on this page:
https://www.flyingvgroup.com/category/in-the-news and every blog post.
Thanks.
Hi, I need to change the Main Sidebar widget headings from <h4 class="h-widget"></h4>
to <h3 class="h-widget"></h3>
like found on this page:
https://www.flyingvgroup.com/category/in-the-news and every blog post.
Thanks.
Hello @flyingvgroup,
Thanks for asking.
As this will require changes in theme files. Before proceeding I suggest you to setup and install Child theme. You can refer following resources to download and instruction on settings up child theme.
https://theme.co/apex/child-themes
After that add following code in child theme function.php
file:
if ( ! function_exists( 'x_widgets_init' ) ) :
function x_widgets_init() {
register_sidebar( array(
'name' => __( 'Main Sidebar', '__x__' ),
'id' => 'sidebar-main',
'description' => __( 'Appears on posts and pages that include the sidebar.', '__x__' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="h-widget">',
'after_title' => '</h3>',
) );
}
add_action( 'widgets_init', 'x_widgets_init' );
endif;
Thanks.
Hi, I added this code and I am still seing an h4 tag. Thank you.
Hi There,
Please update the previous code to this:
function x_widgets_init() {
register_sidebar( array(
'name' => __( 'Main Sidebar', '__x__' ),
'id' => 'sidebar-main',
'description' => __( 'Appears on posts and pages that include the sidebar.', '__x__' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="h-widget">',
'after_title' => '</h3>',
) );
}
add_action( 'widgets_init', 'x_widgets_init' );
If it still doesn’t work, would you mind providing us with login credentials(by clicking on the Secure Note button at the bottom) so we can take a closer look? To do this, you can make a post with the following info:
Thanks.
Perfect. Thank you!
You’re most welcome!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.