WordPress.org

Support

Support » How-To and Troubleshooting » Adding widgets to a single column template

Adding widgets to a single column template

  • We are using a single column template called Capricorn and would like to add widgets. Since this template does not have any sidebars is this possible?

    Thank you in advance.

Viewing 1 replies (of 1 total)
  • Of course, you can.
    Put this into your functions.php

    if (function_exists(‘register_sidebar’) )
    register_sidebars(6 (or any other number), array(

    ));

    and in your template files wherever you want this

    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(1) ) : ?> <?php endif; ?>
    and this
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(2) ) : ?> <?php endif; ?>
    and so on.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding widgets to a single column template’ is closed to new replies.
Skip to toolbar