0

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?

2
  • 1
    Widgets and loop are not comparable, it's like saying should I use a picnic basket or a car.
    – Wyck
    Feb 23, 2013 at 20:55
  • I wish I could award a bounty to that comment @Wyck Feb 23, 2013 at 21:48

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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