• Now the default widgets are h3
    Example:

    <div class=”widget-inner”>
    <h3>Recent Posts</h3></div>

    I need to replace the standard h3 header with any other value.
    In which file this is done, please help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • hannah

    (@hannahritner)

    Hey,
    You can change the h3 settings from Theme Options > Typography. Does that work for you?

    Hannah

    Thread Starter viliksar

    (@viliksar)

    Yes I can.
    But this is not exactly what I need.

    I want to replace h3 with <div>
    How to do this, in which file?

    hannah

    (@hannahritner)

    Are you currently using a child theme? Mind if I ask what your reasoning is?

    Hannah

    Thread Starter viliksar

    (@viliksar)

    Yes, I’m using a child theme.

    hannah

    (@hannahritner)

    What exactly are you trying to replace it with? Sorry, I don’t think I’m fully following…

    Hannah

    Thread Starter viliksar

    (@viliksar)

    H3 remove

    H3 – this is a headline, it prevents me from promoting the site, you know?

    That was so in all widgets:

    <div class=”widget-inner”>
    Recent Posts</div>

    In your child theme a custom function like this should do what you want. Just add to your child theme functions.php file:

    function custom_remove_and_replace_sidebar(){
    	unregister_sidebar( 'sidebar-primary' );
    	register_sidebar(array(
        'name'          => __('Primary Sidebar', 'virtue'),
        'id'            => 'sidebar-primary',
        'before_widget' => '<section id="%1$s" class="widget %2$s"><div class="widget-inner">',
        'after_widget'  => '</div></section>',
        'before_title'  => '<h4>',
        'after_title'   => '</h4>',
      ));
    }
    add_action( 'widgets_init', 'custom_remove_and_replace_sidebar', 11 );

    That would make the primary sidebar use h4 you can change it to whatever you like.

    Ben

    Thread Starter viliksar

    (@viliksar)

    Super!
    Thank you very much!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Change h3 header to another value’ is closed to new replies.