Answer the question
In order to leave comments, you need to log in
How to display sidebar in wordpress?
Guys, I want to display the sidebar on the category pages, I created the category.php file, displayed the header, footer, posts themselves, but I can’t do the sidebar!
The sidebar file is empty, but there are two sidebar files along the paths templates/sidebar-1.php and templates/sidebar-2.php
tried to throw the sidebar-1.php file into the theme directory and connect it with code
Nothing works, I even tried to throw the contents of the file, to the file where I need to output this sidebar'sidebar-1');
get_sidebar(
<div id="sidebar" role="complementary" <?php Avada()->layout->add_class( 'sidebar_1_class' ); ?> <?php Avada()->layout->add_style( 'sidebar_1_style' ); ?>>
<?php if ( ! Avada()->template->has_sidebar() || 'left' == Avada()->layout->sidebars['position'] || ( 'right' == Avada()->layout->sidebars['position'] && ! Avada()->template->double_sidebars() ) ) : ?>
<?php echo wp_kses_post( avada_display_sidenav( Avada()->fusion_library->get_page_id() ) ); ?>
<?php if ( class_exists( 'Tribe__Events__Main' ) && is_singular( 'tribe_events' ) ) : ?>
<?php do_action( 'tribe_events_single_event_before_the_meta' ); ?>
<?php tribe_get_template_part( 'modules/meta' ); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ( isset( Avada()->layout->sidebars['sidebar_1'] ) && Avada()->layout->sidebars['sidebar_1'] ) : ?>
<?php generated_dynamic_sidebar( Avada()->layout->sidebars['sidebar_1'] ); ?>
<?php endif; ?>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question