Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


WordPress 3.05 - How to check if a sidebar has widgets?

Posted on 2011-02-28
Medium Priority
Last Modified: 2012-05-11
How do we check if a sidebar has widgets? I just want to check without calling it.
In general the following is used to check and call:
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(2)) :

Open in new window

My requirement is just to check and not call.

Please guide.
Question by:rajoo_sharma
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 14

Accepted Solution

R-Byter earned 2000 total points
ID: 34999405
Look at this topic on Wordpress forum:



P.S. I saw you posted same question on wordpress forums. :)

Author Comment

ID: 35004473
Thanks for the reply :)
I did post on WP forum as well.
In fact on WP forum too, I got the reply.
is_sidebar_active function is the answer.
Thanks again.

Author Closing Comment

ID: 35004477
Thanks for the solution.
LVL 14

Expert Comment

ID: 35004912
You're welcome and thanks for the points.


Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question