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.

I am developing a WordPress theme, but am stuck on widgetizing my theme.

I have followed several tutorials but still cannot get it to work.
My widgets menu does not appear under Appearance in my dashboard.

This is my function file and sidebar.
From function.php:

function custom_enqueue_scripts() {

        wp_deregister_script( 'jquery' );

        wp_register_script( 'jquery', get_template_directory_uri() . '/bin/js/jquery-1.10.1.min.js', 'jquery', '1.10.1',TRUE);
        wp_register_script( 'fittext', get_template_directory_uri() . '/bin/js/jquery.fittext.js', 'jquery', '1.0',TRUE );

        wp_enqueue_script( 'jquery' );
        wp_enqueue_script( 'fittext' );

}
add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts' );

if (function_exists('register_sidebar')) {

        register_sidebar(array(
                'name' => 'Widgetized Area',
                'id'   => 'katuhu',
                'description'   => 'This is a widgetized area.',
                'before_widget' => '<div id="%1$s" class="widget %2$s">',
                'after_widget'  => '</div>',
                'before_title'  => '<h4>',
                'after_title'   => '</h4>'
        ));

}

From sidebar.php:

<div id="katuhu">

<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Widgetized Area')) : else : ?>

<div class="pre-widget">
    <p><strong>Widgetized Area</strong></p>
    <p>This panel is active and ready for you to add some widgets via the WP Admin</p>
</div>

<?php endif; ?>

`

share|improve this question

1 Answer 1

The file name is functions.php, not function.php. Note the "s". Otherwise, the code should work, and does work when I try it.

share|improve this answer

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.