• Hello,

    I am developing a new WordPress Theme and I’ve sent some versions to WordPress.
    I just got back some improvements before my Theme will be accepted.

    I took almost all task off except this one:

    The widget doesn’t show up in the sidebar when somebody add this.

    My WordPress theme is an one-column Theme and the Sidebar can be a special site.

    How do I do that the Theme shows up the widget?

Viewing 2 replies - 1 through 2 (of 2 total)
  • put this on your sidebar:

    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
       add some default code here, should the user no wish to use any widget
    <?php endif; ?>

    Create a new document called functions.php on your theme index.php root and add thgis code to it, or append the block to it, should you allready have one:

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebars(1, array(
    	'name'=>'wdgtSpot %d','before_widget' => '',
    	'after_widget' => '',
    	'before_title' => '<div class="title">',
    	'after_title' => '</div>',
    ));
    ?>

    There is some unessencial markup in the code block, but I find it very usefull to style the widget´s titles.

    Hope this helps.

    MAC 🙂

    Thread Starter mladenmilinovic

    (@mladenmilinovic)

    It works!

    Thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Widget Problem’ is closed to new replies.