Forums

Moving widgets into footer (5 posts)

  1. rhythmofthecosmos
    Member
    Posted 1 month ago #

    Hi,

    Am looking to move my comment widget and my archives widgets to my footer.

    How would I go about this?

    Thanks

  2. rhythmofthecosmos
    Member
    Posted 1 month ago #

  3. rhythmofthecosmos
    Member
    Posted 1 month ago #

    no one?

  4. RVoodoo
    Member
    Posted 1 month ago #

    well, when I did that, I just grabbed a theme that already had those elements in it....and copied the sections.

    Wish I could think of the theme I used..... I do know I had to add stuff to functions.php and to my footer area, then style everything in the css

    <div class="col1">
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer_left') ) : ?>
    <h3>Looking for something?</h3>
    <p>Use the form below to search the site:</p>
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    <p>Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!</p>
    <?php endif; ?>
    </div>
    
    <div class="col2">
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer_middle') ) : ?>
    <h3>Visit our friends!</h3><p>A few highly recommended friends...</p><ul><?php wp_list_bookmarks('title_li=&categorize=0'); ?></ul>
    <?php endif; ?>
    </div>
    
    <div class="col3">
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer_right') ) : ?>
    <h3>Archives</h3><p>All entries, chronologically...</p><ul><?php wp_get_archives('type=monthly&limit=12'); ?> </ul>
    <?php endif; ?>
    </div>

    added to my footer (inside of some divs)

    if ( function_exists('register_sidebar') )
        register_sidebar(array(
             'name'=>'footer_left',
            'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h3>',
            'after_title' => '</h3>',
        ));
        register_sidebar(array(
    	'name'=>'footer_middle',
            'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h3>',
            'after_title' => '</h3>',
        ));
        register_sidebar(array(
    	'name'=>'footer_right',
            'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h3>',
            'after_title' => '</h3>',
        ));

    added to functions, I think that about did it? That gave me 3 column widget footer with search / links / archives, which could be swapped out for any widget just like standard sidebar stuff

  5. rhythmofthecosmos
    Member
    Posted 1 month ago #

    I think I understand,

    I will have a play in a mo and report back :)

    Thanks :)

Reply

You must log in to post.

About this Topic