sohopigeon
06-28-2010, 04:02 PM
Hi All,
I want to include page boxes not only on my Home Page but other pages too. So I've updated the first few lines in my functions.php file from:
<?php
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
));
}
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Homepage Boxes',
'before_widget' => '<div class="homepage-box">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
?>
to
<?php
if ( function_exists('register_sidebars') ) {
register_sidebars(array(
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
));
}
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name' => 'Homepage Boxes',
'before_widget' => '<div class="homepage-box">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
}
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Page Boxes',
'before_widget' => '<div class="page-box">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
?>
the problem I have is my sidebar text widgets now have an h2 heading not h3...
I don't use h2 anywhere else in the site so I could simply change the stylesheet, but I would rather understand the cause of the problem.
I presume my change to functions.php has somehow caused the problem but I am not sure how. If you have an idea please let me know.
I notice that there is both register_sidebars and register_sidebar (no 's'), I've added an extra register_sidebar. I'm not sure what affect this has.
thank you for continued support developing this site
Kind regards
Will
I want to include page boxes not only on my Home Page but other pages too. So I've updated the first few lines in my functions.php file from:
<?php
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
));
}
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Homepage Boxes',
'before_widget' => '<div class="homepage-box">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
?>
to
<?php
if ( function_exists('register_sidebars') ) {
register_sidebars(array(
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
));
}
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name' => 'Homepage Boxes',
'before_widget' => '<div class="homepage-box">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
}
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Page Boxes',
'before_widget' => '<div class="page-box">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
?>
the problem I have is my sidebar text widgets now have an h2 heading not h3...
I don't use h2 anywhere else in the site so I could simply change the stylesheet, but I would rather understand the cause of the problem.
I presume my change to functions.php has somehow caused the problem but I am not sure how. If you have an idea please let me know.
I notice that there is both register_sidebars and register_sidebar (no 's'), I've added an extra register_sidebar. I'm not sure what affect this has.
thank you for continued support developing this site
Kind regards
Will