Results 1 to 5 of 5

Thread: How to add widget in footer ?

  1. #1
    SonnyCooL's Avatar
    SonnyCooL is offline HeeHa
    Join Date
    Jan 2010
    Location
    Melb/Malaysia
    Posts
    920
    Thanks
    250
    Thanked 92 Times in 78 Posts

    How to add widget in footer ?

    Guy anyone know how to add wp widget in Footer ??
    I just need tag widget in the footer
    thanks
    Last edited by SonnyCooL; 15 October, 2010 at 02:17 AM.

  2. #2
    Andy101's Avatar
    Andy101 is offline Code Otaku
    Join Date
    Aug 2009
    Location
    Kanazawa
    Posts
    1,177
    Thanks
    163
    Thanked 297 Times in 224 Posts
    For this you need to add another Sidebar to your theme even though it's not actually in the sidebar.

    In the latest Twenty Ten theme that comes with WP they have an example.

    In the theme there is a functions.php file that has a function to register a footer sidebar:

    PHP Code:
    // Area 3, located in the footer. Empty by default.
        
    register_sidebar( array(
            
    'name' => __'First Footer Widget Area''twentyten' ),
            
    'id' => 'first-footer-widget-area',
            
    'description' => __'The first footer widget area''twentyten' ),
            
    'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
            
    'after_widget' => '</li>',
            
    'before_title' => '<h3 class="widget-title">',
            
    'after_title' => '</h3>',
        ) ); 
    So this causes the new sidebar to show up in the Admin area of your blog so you can drag and drop widgets to it. Assuming you selected the theme using this code.

    But now you need to add the place-holder code to your theme.

    In the twenty ten theme, I see this code in the footer.php code:

    PHP Code:
    get_sidebar'footer' ); 
    But I don't see how this code relates 'footer' to the first block of code.

    I haven't done this myself but I hope this gets you started in unraveling one of the many mysteries of WordPress.

    The help page is at:
    Widgets API � WordPress Codex

  3. Thanked by:

    Aziz (16 October, 2010), Charles (17 October, 2010), m42 (17 October, 2010), Sami4u (16 October, 2010), SonnyCooL (18 October, 2010)

  4. #3
    SonnyCooL's Avatar
    SonnyCooL is offline HeeHa
    Join Date
    Jan 2010
    Location
    Melb/Malaysia
    Posts
    920
    Thanks
    250
    Thanked 92 Times in 78 Posts
    Quote Originally Posted by Andy101 View Post
    For this you need to add another Sidebar to your theme even though it's not actually in the sidebar.

    In the latest Twenty Ten theme that comes with WP they have an example.

    In the theme there is a functions.php file that has a function to register a footer sidebar:

    PHP Code:
    // Area 3, located in the footer. Empty by default.
        
    register_sidebar( array(
            
    'name' => __'First Footer Widget Area''twentyten' ),
            
    'id' => 'first-footer-widget-area',
            
    'description' => __'The first footer widget area''twentyten' ),
            
    'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
            
    'after_widget' => '</li>',
            
    'before_title' => '<h3 class="widget-title">',
            
    'after_title' => '</h3>',
        ) ); 
    So this causes the new sidebar to show up in the Admin area of your blog so you can drag and drop widgets to it. Assuming you selected the theme using this code.

    But now you need to add the place-holder code to your theme.

    In the twenty ten theme, I see this code in the footer.php code:

    PHP Code:
    get_sidebar'footer' ); 
    But I don't see how this code relates 'footer' to the first block of code.

    I haven't done this myself but I hope this gets you started in unraveling one of the many mysteries of WordPress.

    The help page is at:
    Widgets API � WordPress Codex
    Thanks ....
    btw i just learn this :
    PHP Code:
    <?php wp_tag_cloud(); ?>
    Just add this in footer.php and my tag cloud show

    Thanks

  5. #4
    Andy101's Avatar
    Andy101 is offline Code Otaku
    Join Date
    Aug 2009
    Location
    Kanazawa
    Posts
    1,177
    Thanks
    163
    Thanked 297 Times in 224 Posts
    That's cool. So you added a higher level specific function to the footer and no need to have another sidebar to drag and drop widgets to

  6. #5
    Aziz's Avatar
    Aziz is offline no investment, no glory
    Join Date
    May 2009
    Location
    IL
    Posts
    736
    Thanks
    588
    Thanked 243 Times in 168 Posts
    should have explained it right from the beginning. BTW usually these things aren't styled to be displayed in the footer, so be careful.

Similar Threads

  1. Suggestions for the New 1MFP widget?
    By Mike30 in forum Site Reviews
    Replies: 2
    Last Post: 29 January, 2011, 16:52 PM
  2. how to add footer widget ?
    By SonnyCooL in forum Wordpress
    Replies: 2
    Last Post: 14 June, 2010, 10:18 AM
  3. Weather widget or WP plugin
    By Mr.Bill in forum Blogging
    Replies: 2
    Last Post: 27 April, 2010, 00:48 AM
  4. Widget Bucks anyone?
    By Farrhad A in forum Monetizing
    Replies: 1
    Last Post: 18 July, 2009, 03:38 AM
  5. How can I position my widget sponsorship?
    By geekology in forum Monetizing
    Replies: 4
    Last Post: 5 May, 2009, 07:12 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •