Title: is_active_sidebar
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ‘is_active_sidebar’, bool $is_active_sidebar, int|string $index )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/is_active_sidebar/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/is_active_sidebar/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/is_active_sidebar/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/is_active_sidebar/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/is_active_sidebar/?output_format=md#wp--skip-link--target)

Filters whether a dynamic sidebar is considered “active”.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/is_active_sidebar/?output_format=md#parameters)󠁿

 `$is_active_sidebar`bool

Whether or not the sidebar should be considered "active".
 In other words, whether
the sidebar contains any widgets.

`$index`int|string

Index, name, or ID of the dynamic sidebar.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/is_active_sidebar/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'is_active_sidebar', $is_active_sidebar, $index );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/widgets.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/widgets.php#L997)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/widgets.php#L997-L997)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/is_active_sidebar/?output_format=md#related)󠁿

| Used by | Description | 
| [is_active_sidebar()](https://developer.wordpress.org/reference/functions/is_active_sidebar/)`wp-includes/widgets.php` |

Determines whether a sidebar contains widgets.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/is_active_sidebar/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.9.0](https://developer.wordpress.org/reference/since/3.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fis_active_sidebar%2F)
before being able to contribute a note or feedback.