• I am trying to figure out how to get the automated widgets to output ‘<h3>’ markup for titles instead of the provided ‘<h2>’.

    Rather than mess with the existing function in the core WP install, I’d like to use functions.php to do this.

    I know how to create new functions, but I have no idea how to override existing ones in the core? Can anyone help me with this? Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter marc0047

    (@marc0047)

    Figured it out! The solution actually already exists in the default/ theme folder:

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '<li id="%1$s" class="box %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2>',
            'after_title' => '</h2>',
        ));
    ?>

    I just changed the settings for the ‘before_title’ and ‘after_title’ to <h3>. Voila!

Viewing 1 replies (of 1 total)
  • The topic ‘How to use functions.php to override core WP functions?’ is closed to new replies.