I’ve began a brand new web site with the latest WordPress 5.8.
I’ve made a brand new widget because of the brand new widget builder which use Gutenberg block.
In my capabilities.php
register_sidebar(
array(
'identify' => esc_html__( 'Entête de la web page d'accueil', 'area' ),
'id' => 'head-homepage',
'before_widget' => '<part id="%1$s" class="widget %2$s">',
'after_widget' => '</part>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)
);
The template : sidebar-head-homepage.php
If I take advantage of this : <?php get_sidebar('head-homepage'); ?>
, the template known as, however by default it is empty (obvioulsy, cuz the file is empty…) and $args* is empty
If I take advantage of this : <?php get_sidebar('head-homepage'); ?>
, information from my widget is rendered, however the template will not be callded.
So now, the best way to name my widget appropriately, in order that I can use variables so as to add some CSS on it ?