• I have a sidebar, sidebar 2 and a footer in my functions.php, but only sidebar and footer appears in the widgets.
    My site:
    http://www.myhreogdahlbygg.no/wordpress/jobber/

    this is my function.php:
    <?php

    if ( function_exists(‘register_sidebar’) ) {
    if ( get_option(‘page_setup’) != ‘no-sidebar’ ) {
    register_sidebar(array(
    ‘name’ => ‘Sidebar’,
    ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ”,
    ‘before_title’ => ‘<h2 class=”widgettitle”>’,
    ‘after_title’ => ‘</h2>’,
    ));
    }
    if ( get_option(‘page_setup’) == ‘double-right-sidebar’ ) {
    register_sidebar(array(
    ‘name’ => ‘Sidebar 2’,
    ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ”,
    ‘before_title’ => ‘<h2 class=”widgettitle”>’,
    ‘after_title’ => ‘</h2>’,
    ));
    }
    register_sidebar(array(
    ‘name’ => ‘Footer’,
    ‘before_widget’ => ‘<div class=”widget-wrap”><div class=”widget %2$s”>’,
    ‘after_widget’ => ‘</div></div>’,
    ‘before_title’ => ‘<h2>’,
    ‘after_title’ => ‘</h2>’,
    ));
    }

    if( !function_exists(‘array_combine’) ) {
    function array_combine($a, $b) {
    $c = array();
    $at = array_values($a);
    $bt = array_values($b);
    foreach($at as $key=>$aval) $c[$aval] = $bt[$key];
    return $c;
    }
    }

    /**
    * Debug
    */
    function EGDEBUG($text) {
    global $__EGDEBUG_FD;
    if ( !$__EGDEBUG_FD ) {
    $__EGDEBUG_FD = fopen(“eg_debug.txt”, “a”);
    }

    fwrite($__EGDEBUG_FD, $text.”\n”);
    }

    ?>

    And this is the code I use in my sidebar.php:
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) : ?>
    <?php endif; ?>

The topic ‘sidebar not registered’ is closed to new replies.