Link to home
Start Free TrialLog in
Avatar of rajoo_sharma
rajoo_sharma

asked on

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

Hi,
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.
Thanks
ASKER CERTIFIED SOLUTION
Avatar of R-Byter
R-Byter
Flag of Serbia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rajoo_sharma
rajoo_sharma

ASKER

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.
Thanks for the solution.
You're welcome and thanks for the points.

Regards