Hi Whoji,
As for the 1st issue, please read these lines below as our assistance:
You can go to wp-content/themes/<your-theme-folder>
and add this following code into page.php
<?php if ( is_singular('dwqa-question') ): ?>
<?php dynamic_sidebar() ?>
<?php endif; ?>
If you want to register another sidebar for single question you can add this following code into functions.php
at your theme folder.
function dwqa_theme_register_sidebar() {
register_sidebar( array(
'name' => __( 'Single Question', 'twentysixteen' ),
'id' => 'single-question',
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'dwqa_theme_register_sidebar' );
and change dynamic_sidebar()
in the 1st code example to dynamic_sidebar( 'single-question' )
If you encounter any problem, please do not hesitate to get back to us. We’re here to help you.