505 posts
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item that became a weekly top seller
+5 more
CraigSnedeker
says

I want to add a widget are in the footer so I can add widgets from the widgets area in adminCP. what’s the code for that? thx

922 posts
  • Became a Top 20 Author of the Month
  • Had an item that became a weekly top seller
  • Power Elite Author: Sold more than $1M on Envato Market
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
+15 more
MDNW
says

I won’t go into the code because there are actually a few ways you can approach this and every theme uses a unique framework, but essentially you need to register a new sidebar and then call it back in the template file…

Regarding the sidebar registration: you may need to register as many as 2, 3, or 4 of them depending on how many widgets you want and how you are styling them – I’ve seen people use one sidebar and “float:left;” each individual widget, or use a separate sidebar for each column of widgets and allow them to stack – it depends on your desgn.

To register sidebars, check out this article:

1. http://codex.wordpress.org/Function_Reference/register_sidebar

Once you’ve registered the sidebar, you then you need to call back the sidebar using the dynamic sidebar include in the template file (ie: index.php, or footer.php):

2. http://codex.wordpress.org/Function_Reference/dynamic_sidebar

It took me several attempts over the course of an hour the first time I worked on this… but with some trial & error and a little perseverance you’ll do fine :)

922 posts
  • Became a Top 20 Author of the Month
  • Had an item that became a weekly top seller
  • Power Elite Author: Sold more than $1M on Envato Market
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
+15 more
MDNW
says

I should also note that if you are using a theme that uses a formal framework (ie: thematic or any of the many others out there), this method will need to adapt to the framework for that theme. I know, this is probably pretty annoying, but essentially you need to identify where the theme’s sidebars are being registered at and work in the same spot. They may also be using some sort of custom dynamic_sidebar callback as well – you’ve just gotta sort out how your theme’s functioning and work within those parameters. If you’re using a Vanilla framework without any custom sidebar code, you can do as you please though.

Also – someone else in the forums may have a better answer for you :) – I’m just dishing out from my experience. There’s always someone with a better coding method out there though.

505 posts
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item that became a weekly top seller
+5 more
CraigSnedeker
says

Ok, thanks. I’m making my own theme, using the default theme as my foundation (just editing it).

Oh, and where do I register the sidebar? (Keep redistributing in mind)

640 posts
  • Has referred more than 5000 members
  • Has sold $5M+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Had an item featured in a magazine
+12 more
Kriesi
says
Oh, and where do I register the sidebar?

Usually in functions.php

505 posts
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item that became a weekly top seller
+5 more
CraigSnedeker
says

Just paste the code in?

640 posts
  • Has referred more than 5000 members
  • Has sold $5M+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Had an item featured in a magazine
+12 more
Kriesi
says

exactly

922 posts
  • Became a Top 20 Author of the Month
  • Had an item that became a weekly top seller
  • Power Elite Author: Sold more than $1M on Envato Market
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
+15 more
MDNW
says

Yep – usually you do it in functions.php – I’ve also seen it separated into it’s own file as well (ie: a new file called “widgets.php”), but that’s purely up to you as the author. Themes with lots and lots of add-on functions benefit from separate files (its just easier to read and find what you want), but simple themes benefit from packing everything into functions.php. Good luck!

505 posts
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item that became a weekly top seller
+5 more
CraigSnedeker
says

Ok, thanks. I’ll give that a try :D

505 posts
  • Has referred 10+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item that became a weekly top seller
+5 more
CraigSnedeker
says

Can’t get it to work. Errors and stuff. :(

by
by
by
by
by
by