Core Function
View Source on Trac ↗ wp_assign_widget_to_sidebar()
wp_assign_widget_to_sidebar( mixed $widget_id, mixed $sidebar_id ) Assigns a widget to the given sidebar.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $widget_id string | The widget ID to assign. Required |
| $sidebar_id string | The sidebar ID to assign to. If empty, the widget won't be added to any sidebar. Required |
Return Value
(void)
No return value description available.
Function Information
Since Version
5.8.0
Source File
wp-includes/widgets.php
Advertisement