552 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 100+ members
  • Located in Canada
  • Has collected 100+ items on Envato Market
+1 more
OurWebMedia says

Ugh! Let me repost this….

552 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 100+ members
  • Located in Canada
  • Has collected 100+ items on Envato Market
+1 more
OurWebMedia says

Hello,

I’m trying to make a widget ready footer and seem to be having a great deal of trouble.

Can someone please help me out a little and see if I’ve doing this right?

function.php

/*    ##################################
    WIDGET FORMAT
    ################################## */

 if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'Article Sidebar','before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
 if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'FooterLeft','before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
 if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'FooterCenter','before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
 if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'FooterRight','before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
 if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'FooterExtremeRight','before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));

footer.php

<div id="subfooter">
    <div class="FooterLeft">
            &lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('FooterLeft') ) : ?&gt;
            &lt;?php endif; ?&gt;
    </div>    

    <div class="FooterCenter">
        &lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('FooterCenter') ) : ?&gt;        &lt;?php endif; ?&gt;
    </div>    

    <div class="FooterRight">
            &lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('FooterRight') ) : ?&gt;
            &lt;?php endif; ?&gt;
    </div>    

    <div class="FooterExtremeRight">
            &lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('FooterExtremeRight') ) : ?&gt;
            &lt;?php endif; ?&gt;
    </div>

</div>

style.css

/* Page footer - widgets
------------------------------------------------------*/

#subfooter {
width:910px;
overflow: hidden;
margin-left:auto;
margin-right:auto;
height:auto;
background: url(images/black-1.png);
clear:both;
}  

.FooterLeft {
    width: 220px;
    float: left;
        padding: 2px;
    }

.FooterRight {
    width: 220px;
    float: left;
        padding: 2px;
    }

.FooterCenter {
    width: 220px;
    float: left;
        padding: 2px;
    }

.FooterExtremeRight {
    width: 220px;
    float: left;
        padding: 2px;
    }

#subfooter .FooterLeft .widget {
  margin-bottom: 10px;
  float: left;
  width: 205px;
  display: block;
  position: relative;
}  

#subfooter .FooterCenter .widget {
  margin-bottom: 10px;
  float: left;
  width: 205px;
  display: block;
}  

#subfooter .FooterRight .widget {
  margin-bottom: 10px;
  float: left;
  width: 205px;
  display: block;
}  

#subfooter .FooterExtremeRight .widget {
  margin-bottom: 10px;
  float: left;
  width: 205px;
  display: block;
}  

#subfooter ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
#subfooter ul li {
  list-style-type: circle;
  margin: 0px 0px 2px 25px;
  padding: 1px 0px 0px 0px;
}
#subfooter ul li a {
  font-size: 10px;
}
#subfooter

.alignright { float: right; margin-left: 10px; margin-right: 2px;}

.aligncenter { margin-right: auto; margin-left: auto; }

.alignleft { float: left; margin-right: 10px; margin-left:2px;}

I’ve tried everything to get my widgets to appear in columns instead of showing up underneath the next one.

I started by learning this tutorial: http://digwp.com/2010/02/how-to-widgetize-wordpress-theme/

Which lead me to create the widget ready footer, but wasn’t able to make it so I could have them appear in columns beside one another (4 different widgets). So I went on a hunt and found the above code source that apparently works for others but cannot get it to work for me.

Any suggestions?

Thanks a lot!

Kind regards, Bryce

552 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 100+ members
  • Located in Canada
  • Has collected 100+ items on Envato Market
+1 more
OurWebMedia says

OK, I figured out my own problems :) Thanks.

1 post
  • Has been part of the Envato Community for over 5 years
brandy1j says

Can you share the fix..?

552 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 100+ members
  • Located in Canada
  • Has collected 100+ items on Envato Market
+1 more
OurWebMedia says

Actually, I ended up not using that reference for my widgets.

I used this tutorial: http://wpshout.com/widgetised-footer-with-columns-in-wordpress/

Copying and pasting everything over will help you out and then just customize the CSS to suit your needs. Fantastic tutorial and will help you out :)

by
by
by
by
by
by