505 posts
  • Has referred 10+ members
  • Has sold $100+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
+4 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
  • Power Elite Author: Sold more than $1M on Envato Market
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
  • Won a competition
  • Made it to the Authors' Hall of Fame
+13 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
  • Power Elite Author: Sold more than $1M on Envato Market
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
  • Won a competition
  • Made it to the Authors' Hall of Fame
+13 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 $100+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
+4 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)

631 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
+9 more
Kriesi says
Oh, and where do I register the sidebar?

Usually in functions.php

505 posts
  • Has referred 10+ members
  • Has sold $100+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
+4 more
CraigSnedeker says

Just paste the code in?

631 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
+9 more
Kriesi says

exactly

922 posts
  • Power Elite Author: Sold more than $1M on Envato Market
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
  • Won a competition
  • Made it to the Authors' Hall of Fame
+13 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 $100+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
+4 more
CraigSnedeker says

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

505 posts
  • Has referred 10+ members
  • Has sold $100+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
+4 more
CraigSnedeker says

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

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by