In my footer.php
I've added <?php get_sidebar('lj_sidebar'); ?>
In my functions.php
I've enabled widgets: add_theme_support('widgets');
and made a action hook add_action('widgets_init', 'lj_widgets');
Then in my widgets.php
I make the widget like this:
<?php
function lj_widgets() {
register_sidebar(array(
'name' => __('My First Theme Footer','lnj'),
'id' => 'lj_sidebar',
'description' => __('Footer for my first theme','lnj'),
'class' => '',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2>',
'after_title' => '</h2>'
));
}
In my sidebar.php
I check if the sidebar is enabled:
<?php
if(is_active_sidebar('lj_sidebar')) {
dynamic_sidebar('lj_sidebar');
}
The widget is visible in my admin panel. But when I put for example a textfield in it. It's not showing up?
What am I doing wrong here?