open
25.11.2022.

The Sidebar

You can use the following code snippet to call sidebar and display the widgets in sidebar.php

// call te sidebar on index page or single

<?php get_footer(); ?>

// call the widget on sidebar.php

// register the widget on functions.php
<?php if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '<div class=”widget”>',
'after_widget' => '</div>',
'before_title' => '<h2 >',
'after_title' => '</h2>',
'name' => 'sidebar'
));
;?>

Copy to Clipboard

Related posts

Got a question? Is something not working? Write and I'll answer!

Leave a Reply

Your email address will not be published. Required fields are marked *