do_action( ‘get_sidebar’, string|null $name, array $args )

In this article

Fires before the sidebar template file is loaded.

Parameters

$namestring|null
Name of the specific sidebar file to use. Null for the default sidebar.
$argsarray
Additional arguments passed to the sidebar template.

Source

do_action( 'get_sidebar', $name, $args );

Changelog

VersionDescription
5.5.0The $args parameter was added.
2.8.0The $name parameter was added.
2.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.