Support » Themes and Templates » Am I an idiot?

Am I an idiot?

  • I’ve searched the forums up and down (as well as Google) and either don’t know what I am searching for, or haven’t found it…

    Anyway, I know how to create a custom widget:

    if ( function_exists('register_sidebar') ) {
    register_sidebar(array('name'=>'Home Sidebar','before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h4>','after_title' => '</h4>',)); }

    …which will appear in my Admin as Home Sidebar in the drop down. After populating with the plugins I’d like to go into the widget, how do I make the wiget appear in my theme without having to use sidebar.php?

    The plugins in the sidebar are used for interior Pages, whereas I have a custom theme and just want to know how I can insert the custom widgets (and corresponding plugins) with a variation of a php tag for the homepage (home.php)

    Thanks in advance to anyone willing to help ~

Viewing 3 replies - 1 through 3 (of 3 total)
  • Christine Rondeau


    Volunteer Forum Moderator

    If I understand correctly, you’re wanting to create a custom sidebar which called home sidebar which will only appear on a particular page.

    To do this create the custom sidebar (called say sidebar-custom.php) as you mention and then use in the template.

    <?php include ('sidebar-custom.php'); ?>


    That did it! I was making the mistake of naming my custom sidebar ‘home-sidebar’. The fundamental element here is that the sidebar must start with the name ‘sidebar-[fill in the blank]’

    Thank You again….you’ve ended hours of endless searching.

    Christine Rondeau


    Volunteer Forum Moderator

    Cool, glad to hear that I could help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Am I an idiot?’ is closed to new replies.