From the docs...
is_dynamic_sidebar:
"This Conditional Tag checks if the current sidebar has active widgets"
is_active_sidebar:
"This Conditional Tag checks if a given sidebar is active (in use)."
What's the difference?
From the docs...
is_dynamic_sidebar:
"This Conditional Tag checks if the current sidebar has active widgets"
is_active_sidebar:
"This Conditional Tag checks if a given sidebar is active (in use)."
What's the difference?
Hi there,
One can register multiple sidebars on a given theme, but one might not necessarily add widgets to a particular one. That's where the tags you are asking about come in handy:
is_active_sidebar ('number', 'id', or 'name') returns true if a certain sidebar (identified by its ID, number, or name) contains widgets and false if it does not.
is_dynamic_sidebar returns true if the current sidebar contains widgets and false if it does snot.
The tag is_active_sidebar is newer since it was introduced in WP 2.8, while is_dynamic_sidebar was introduced in WP 2.2.
I hope this explanation helps.
Oh I see, the later just checks whether *any* sidebar is registered and has widgets - possibly a throw back to the time when there was only 1 sidebar?
You must log in to post.