Category Covered

how to call wordpress sidebar

To call your dynamic wordpress sidebar follow the instruction

<?php if ( is_active_sidebar( 'right-sidebar' ) ) : ?>
	<ul id="sidebar">
		<?php dynamic_sidebar( 'right-sidebar' ); ?>
	</ul>
<?php endif; ?>

to call right sidebar on wordpress
<ul id="sidebar">
	<?php dynamic_sidebar( 'right-sidebar' ); ?>
</ul>

 

You can use another way to call sidebar.

Suppose your sidebar file names for the right and left sidebars should be sidebar-left.php and sidebar-right.php respectively

You can call it by:

get_sidebar( 'right' );
and/or
get_sidebar( 'left' );

4HCUZVK7UCBV