• leighland2000

    (@leighland2000)


    I am trying to update my custom theme to use widgets. I got the functions.php file to work, and I can create a sidebar with the widgets.

    But when I try to add the dynamic sidebar code:

    <?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>

    The entire sidebar disappears.

    I’ve tried putting that code in all different parts of the sidebar.php but no luck. It breaks everyplace I put it.

    Here’s my sidebar:
    http://wordpress.pastebin.ca/1018559

Viewing 3 replies - 1 through 3 (of 3 total)
  • jonimueller

    (@jonimueller)

    Did you add the functions.php file as well?

    jonimueller

    (@jonimueller)

    Create a functions.php file that goes in the same theme folder as the rest of your theme template files. It contains this:

    <?php
    	if (function_exists('register_sidebar'))
        register_sidebar();
    ?>

    Oh, and in your sidebar.php file, right before that last </ul>, you should have:

    <?php endif; ?>

    So it looks like this:

    <?php endif; ?>
    </ul>
    Thread Starter leighland2000

    (@leighland2000)

    thanks so much! that worked!

    now how do i style those widgets? i don’t want them with bullets. will i have to remove the

    • tags from somewhere?
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Widgetizing my theme makes the sidebar disappear’ is closed to new replies.