WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, I have a sidebar that I'm going to list all posts in, I could just use a widget. But is it proper to use a new loop instead of a widget, or preferential?

share|improve this question
Widgets and loop are not comparable, it's like saying should I use a picnic basket or a car. – Wyck Feb 23 '13 at 20:55
I wish I could award a bounty to that comment @Wyck – Matthew Boynes Feb 23 '13 at 21:48

You should always use widgets when you need to add any kind of content to the sidebar. The reason is very practical - once the project is over the owner of the site will not need to contact you just because he wants to put a banner before your "loop", and even during development it easier to just move a widget then edit your code when needed.

Widget are also reusable in all the sidebars of the site, and if you pack them as a plugin, or in separate file, it is easy to reuse them in other projects.

Many advantages for just a little amount of extra work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.