?
Solved

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

Posted on 2011-02-28
4
Medium Priority
?
295 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:rajoo_sharma
[X]
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
4 Comments
 
LVL 14

Accepted Solution

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

http://wordpress.org/support/topic/is_dynamic_sidebar-to-return-false-with-multiple-sidebars

Regards

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

Author Comment

by:rajoo_sharma
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.
0
 

Author Closing Comment

by:rajoo_sharma
ID: 35004477
Thanks for the solution.
0
 
LVL 14

Expert Comment

by:R-Byter
ID: 35004912
You're welcome and thanks for the points.

Regards
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

777 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