Questions & Answers Plugin + Business Feature Theme (No Side Bards on Questions Page)

I am using a fresh install of the Q&A plugin and Business Feature Theme and on i cannot seem to get the widget area to appear. I placed a widget in all widget areas within Appearance>Widgets and i can only get widgets to show on the regular pages /home page

  • Mason
    • DEV MAN’s Sidekick

    Hiya mrmikeman,

    The QA plugin doesn’t provide a sidebar by default (as those are pretty specific to each theme). You can create one though. You’ll make a copy sidebar-page.php and change the name to sidebar-question.php.

    From there, you need to register a new widget area in your functions.php file. Once again, we can copy/paste and changing it slightly to add a unique one for all questions page:

    'name' => __( 'page-question', TEMPLATE_DOMAIN),
    'id' => 'page-sidebar',
    'description' => __( 'Question Sidebar', TEMPLATE_DOMAIN),
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widgettitle">',
    'after_title' => '</h3>'

    The final bit is to open up the newly created sidebar-question.php and make sure that lines 30-31 refer to page-question in between the single quotes like so:

    <?php if ( is_active_sidebar( 'page-question' ) ) : ?>

    Now you have a unique widget area for Q&A pages. The same process will work for any theme.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.