Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

My Widget Option is missing in the Dashboard area. How can i make that appear? I have downloaded this Blank Theme from Chris Coyiers site.

sidebar.php

<?php
/**
 * @package WordPress
 * @subpackage HTML5-Reset-WordPress-Theme
 * @since HTML5 Reset 2.0
 */
?>

<div class="sidebar">
  <?php if (!function_exists('dynamic_sidebar') && !dynamic_sidebar('Sidebar Widgets')) : else : ?>

  <!-- All this stuff in here only shows up if you DON'T have any widgets active in this zone -->

  <?php get_search_form(); ?>
  <h3>
    <?php _e('Archives','html5reset'); ?>
  </h3>
  <ul>
    <?php wp_get_archives('type=monthly'); ?>
  </ul>
  <h3>
    <?php _e('Meta','html5reset'); ?>
  </h3>
  <ul>
    <?php wp_register(); ?>
    <li>
      <?php wp_loginout(); ?>
    </li>
    <li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.','html5reset'); ?>">
      <?php _e('WordPress','html5reset'); ?>
      </a></li>
    <?php wp_meta(); ?>
  </ul>
  <h3>
    <?php _e('Subscribe','html5reset'); ?>
  </h3>
  <ul>
    <li><a href="<?php bloginfo('rss2_url'); ?>">
      <?php _e('Entries (RSS)','html5reset'); ?>
      </a></li>
    <li><a href="<?php bloginfo('comments_rss2_url'); ?>">
      <?php _e('Comments (RSS)','html5reset'); ?>
      </a></li>
  </ul>
  <?php endif; ?>
</div>

the widget code in my functions.php

// Widgets
if ( !function_exists('register_sidebar' )) {
    function html5reset_widgets_init() {
        register_sidebar( array(
            'name'          => __( 'Sidebar Widgets', 'html5reset' ),
            'id'            => 'sidebar-primary',
            'before_widget' => '<aside id="%1$s" class="widget %2$s">',
            'after_widget'  => '</aside>',
            'before_title'  => '<h2 class="widget-title">',
            'after_title'   => '</h2>',
        ) );
    }
    add_action( 'widgets_init', 'html5reset_widgets_init' );
}
share|improve this question
add comment

1 Answer

I replaced this

// Widgets
if ( !function_exists('register_sidebar' )) {
function html5reset_widgets_init() {
    register_sidebar( array(
        'name'          => __( 'Sidebar Widgets', 'html5reset' ),
        'id'            => 'sidebar-primary',
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget'  => '</aside>',
        'before_title'  => '<h2 class="widget-title">',
        'after_title'   => '</h2>',
    ) );
}
add_action( 'widgets_init', 'html5reset_widgets_init' );

}

into this ..

// Widgets
if (function_exists('register_sidebar')) {
    register_sidebar(array(
        'name' => 'Sidebar Widgets',
        'id'   => 'sidebar-widgets',
        'description'   => 'These are widgets for the sidebar.',
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget'  => '</aside>',
        'before_title'  => '<h2>',
        'after_title'   => '</h2>'
    ));
}

Then the widget option came out..

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.