WordPress action hook · part of WordPress core
dynamic_sidebar
A WordPress core action that 18 plugins also fire themselves, running on 8,720+ sites between them.
How to use dynamic_sidebar
It's an action: your callback runs at that point and receives 1 argument. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'dynamic_sidebar', function( $wp_registered_widgets ) {
// Your code runs here.
}, 10, 1 );Argument names come from Widgetize Pages Light's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
18 plugins that fire dynamic_sidebar
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
FastPixel Cache4,000+ installs
do_action( 'dynamic_sidebar', $registered )inc/page-fragments-generic.php:329 -
Widgetize Pages Light2,000+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )include/otw_sbm_core.php:310 -
MDTF900+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )classes/page.php:408 -
Advanced Custom Fields500+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )widget-relationship-field-v4.php:405 -
Dashboard Notes500+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )dashboard-notes.php:459 -
Dashboard Widget Sidebar300+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )dashboard-widget-sidebar.php:57 -
Widget Alias200+ installs
do_action( 'dynamic_sidebar', $alias_widget )widget-alias.php:273 -
Fast Flow100+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )lib/class.fastflow.widgets.interface.php:395 -
Popping Sidebars and Widgets Light80+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )include/otw_pswl_core.php:260 -
Appeto50+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )json-api/controllers/widgets.php:80 -
appful Mobile App Plugin [OLD20+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[ $id ] )controllers/widgets.php:84 -
RESTful JSON API10+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )controllers/widgets.php:92 -
Widget Rotator Pro10+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )widget_rotator_pro.php:128 -
hiWeb Core10+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )inc/hiweb-core-wp.php:589 -
bizconnector10+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )controllers/widgets.php:80 -
Android and iOS App plugin for WooCommerce by WSD10+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )controllers/widgets.php:80 -
MobPress10+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )controllers/widgets.php:80 -
Layout Engine10+ installs
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] )blocks/block.widget.php:326
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.