Support » Fixing WordPress » get_sidebar with name parameter is displaying too many sidebars

  • I inherited what I thought would be a simple design project: add three widget areas to a home page.

    The existing functions.php had register_sidebar arrays for:

    'name'=>'Page Left'
    'name'=>'Page Right'

    (unnecessary code removed to shorten post)

    I added

    'name'=>'Home Page Latest Posts'
    'name'=>'Home Page Newsletter'

    I then added my first widget area on the home page with:

    	if (dynamic_sidebar('Video')) {

    above the existing get_sidebar('Home');

    My ‘Video’ widgets show up exactly as expected. What I also get, though, is a second copy of the widgets from the Home sidebar.

    Even more peculiar is that this second block of widgets is wrapped in
    <div id="sidebar" role="complementary">

    A global search though the all the theme php, css, widgets, plugins, page/post content, and even the comments doesn’t find that code.

    When I remove the get_sidebar(‘Video’) the second copy of the Home widgets also goes away.

    There is no sidebar.php or sidebar-x.php in the theme, and the only other theme in the folder is TwentyTen, which does have a sidebar.php, but it does not contain the offending code.

    If I remove the widgets from Home, then a Page List appears, which tells me there is a default theme lurking somewhere, but I don’t have FTP access to the site to verify that.

    1. How is an explicit call to a named sidebar retrieving content from another sidebar with a different name?

    2. Where is the <div id="sidebar" role="complementary"> coming from?

    3. How do I get rid of the duplicate content?

    You can view the site at:

    WordPress version is 3.0.4
    Plugins are:

    • Advanced Most Recent Posts Mod
    • All in One Webmaster
    • Crony Cronjob Manager
    • FormBuilder
    • Highlight Search Terms
    • KG Archives
    • List Subpages
    • Newsletter Pro
    • NextGEN Gallery
    • Recent Posts Embed
    • ShareThis
    • Video Sidebar Widgets
    • Viper’s Video Quicktags
    • W3 Total Cache
    • Widget Logic
    • WordPress Importer
    • WP-Crontrol
    • WPEngine Snapshot
    • WPEngine System
  • The topic ‘get_sidebar with name parameter is displaying too many sidebars’ is closed to new replies.