Can you make this WP template widget-ready?

Discussion in 'HTML & Website Design' started by lokielookies, May 22, 2008.

  1. #1
    Hi

    I'm looking for someone who can make a WP template (dual sidebars) widget-ready/aware.

    I've tried several things, but in my WP admin panel I still see the 'this template is not widget-aware' message.

    This is the theme
     
    lokielookies, May 22, 2008 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Create a functions.php file and insert the following code:

    
    <?php
    if ( function_exists('register_sidebar') )
    	register_sidebar();
    ?>
    
    PHP:
    Then use the following code for your sidebars:

    
    <div id="sidebar">
    	<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    		<!-- your regualr non-widget sidebar content goes here as a fallback option -->
    	<?php endif; ?>
    </div>
    
    PHP:
     
    Dan Schulz, May 22, 2008 IP
    lolage likes this.
  3. lolage

    lolage Active Member

    Messages:
    1,129
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    78
    #3
    Dan yet again to the rescue. :)

    Dan, you helped me ages ago and write me a VERY LONG post explaining HTML+CSS over on Sitepoint. Would like to take this opportunity to thank you again. :)

    Thread: http://www.sitepoint.com/forums/showthread.php?t=513419
    Your legendary post: http://www.sitepoint.com/forums/showpost.php?p=3621653&postcount=17
     
    lolage, May 22, 2008 IP
    Dan Schulz likes this.
  4. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Heh, I remember that thread. I'd change display: block; to vertical-align: bottom; though - otherwise you wouldn't be able to use inline images such as smileys. :)
     
    Dan Schulz, May 22, 2008 IP
  5. lokielookies

    lokielookies Well-Known Member

    Messages:
    1,246
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    150
    #5
    Thanks a million. :D
    It seems to be working.

    Just one more question: now i have one widgetized sitebar. How can can I also widgetize the right sidebar?
     
    lokielookies, May 22, 2008 IP
  6. lokielookies

    lokielookies Well-Known Member

    Messages:
    1,246
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    150
    #6
    Oops! I posted too soon.

    The widget section in my control panel is visible, but when I try to add a widget, nothing ppears in neither of the sidebar columns... :(
     
    lokielookies, May 22, 2008 IP
  7. ferman

    ferman Well-Known Member

    Messages:
    968
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    140
    #7
    there are widget plugins to make worpdress theme widget ready you can try those and follow the instruction of plugin
     
    ferman, May 22, 2008 IP
  8. lokielookies

    lokielookies Well-Known Member

    Messages:
    1,246
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    150
    #8
    Can you please point me to one, 'cos I can't seem to find it
     
    lokielookies, May 23, 2008 IP
  9. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Sorry, I forgot you had multiple separate sidebars. Normally I tend to "fake" multiple sidebars by having them both called by the same sidebar.php file.

    Hang on, let me see what I can do (I make no guarantees this will work, however).
     
    Dan Schulz, May 23, 2008 IP