dynamic_sidebar

FUNCTION wp-includes\widgets.php (ligne 682) github
Displays dynamic sidebar. By default this displays the default sidebar or 'sidebar-1'. If your theme specifies the 'id' or 'name' parameter for its registered sidebars you can pass an ID or name as the $index parameter. Otherwise, you can pass in a numerical index to display the sidebar at that index.

Paramètres

Entrée :
$index = 1
Sortie :
@param int|string $index Optional. Index, name or ID of dynamic sidebar. Default 1.
@return bool True, if widget sidebar was found and called. False if not found or not called.

Utilisation

// Utilisation de la fonction dynamic_sidebar
$result = dynamic_sidebar($index = 1);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...