Viewing 14 replies - 1 through 14 (of 14 total)
  • If more than one sidebar… take a look at these threads:
    http://ww.wp.xz.cn/search/multiple+sidebars+widgets?forums=1

    Thread Starter dominoeffect

    (@dominoeffect)

    Hey moshu, Thanks!

    one question: does that matter if i only want to widgetise one of the sidebars?

    Well, in that case you don’t have to worry about the code for multiple sidebars.

    Thread Starter dominoeffect

    (@dominoeffect)

    Cool man thanks.

    ANy help on the original points would also be appreciated. Having no joy with it at all!

    You already found all the necessary documentation for widgetizing.

    Apply the widget call code to your sidebar file. Don’t forget to close the if statement.
    Add a functions.php file to your theme (can copy from classic).
    If you are using a second sidebar file, e.g. named mysidebar.php -> modify the functions.php code to reflect its name.
    Call that custom sidebar with the proper include line:
    <?php include (TEMPLATEPATH . '/mysidebar.php'); ?>
    That’s it.

    Thread Starter dominoeffect

    (@dominoeffect)

    Ok, so I’ve added code to the sidebar (second.php) to make it look like this

    <div id="midCol">
    	<?php if ( !function_exists('dynamic_sidebar')
            || !dynamic_sidebar() ) : ?>
    
    .....SIDEBAR CONTENT
    
        <?php endif; ?>
    </div>

    And added this to the top of functions.php in the wp-include folder:

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '',
            'before_title' => '<div class="title">',
            'after_title' => '</div>',
        ));
    ?>

    But in the admin panel it’s still not recognising the sidebar, although it looks ok.

    Any ideas people?

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array('name'=>'second',
            'before_widget' => '',
            'after_widget' => '',
            'before_title' => '<div class="title">',
            'after_title' => '</div>',
        ));
    ?>
    Thread Starter dominoeffect

    (@dominoeffect)

    Ahh so I shouldn’t be editing functions.php in the wp-include folder, but making a newbie in the actual theme folder, right?

    Yes, nobody ever talked about the wp-include folder.
    I explicitely told you:
    Add a functions.php file to your theme (can copy from classic).

    Thread Starter dominoeffect

    (@dominoeffect)

    I wrote that post before your reply came up, sorry. I stupidly assumed it was the other functions.php file.

    Rule of thumb: don’t do anything until you are sure you got the latest reply and being sure you understood it πŸ™‚

    Thread Starter dominoeffect

    (@dominoeffect)

    Learned πŸ™‚

    Thread Starter dominoeffect

    (@dominoeffect)

    Ok the sidebar is now sidebar-conscious, thank you for all your help and understanding Moshu.

    I will probably be back with another mad enquiry + learned patience! Thanks again bro.

    gfurst

    (@gfurst)

    Hello there… i’m with a similar problem….
    Trying to read about but only getting more lost. I tried to read something on that API about widget… but i’m afraid i might die if continued….

    Here is the thing… i did make the first bar widgetized, but my theme has a total of four colums, the first/page content/and the others two.
    And aparently the others two are in obar.php(nao-sapien theme). And now i have no idea what step to take…

    Where i put what??? and about the name thing? Please help me, and be patient. thank you

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Getting theme widget ready–’ is closed to new replies.