Can the Q&A questions page become virtual page?

Hi there,

I noticed that with a couple of other wpmudev plugins (Classifieds and Directory), they are listed as virtual pages in the Admin Dashboard which is neat as I can change its page settings.

Is it possible / on the roadmap for Questions to become one of those too? I would love to choose the right page template for it to use, and its all because I want to use a specific sidebar set of widgets with it.

Many thanks for considering,

  • aecnu
    • WP Unicorn

    Greetings Joanna,

    Thank you for the great question and there is indeed only one person, the lead developer, whom can answer this question accurately regarding if this feature is on the road map.

    Therefore I will see if I can get the lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Hakan
    • The Incredible Smush

    I am not sure what you mean by virtual pages.

    Both Directory and Q&A use custom posts and their pretty permalink structure is like this:

    If you mean using non pretty permalink structure, like:

    it is not possible in Q&A as it uses its own templates and this cannot be realized. Also most our other plugins (e.g. MarketPress) must use pretty permalinks.

    But "questions" term can be changed, e.g. :

    I hope this helps.


  • Joanna
    • Site Builder, Child of Zeus

    Hi Hakan,

    Thanks for the permalink info but I was referring to Templates and their use with Questions. I've attached a screenshot of what I meant by Virtual Pages.

    In the meantime, I've worked out how to get a sidebar with the widgets I want on the Question pages. I've written up the instructions here in case anyone else is interested and if you wanted to add this to the Q&A Usage section?

    Prereq - Make sure you have chosen a sidebar layout on your Questions page layout.

    1. As Q&A doesn't have a default sidebar template file in /default-templates, copy the sidebar template from your theme and rename it to: sidebar-question.php

    2. Add the following to your functions.php file so you get the 'Questions Sidebar' widget appear in your Dashboard:

    		'name' => __('Questions Sidebar', 'responsive'),
    		'description' => __('sidebar-question.php', 'responsive'),
    		'id' => 'question-sidebar',
    		'before_title' => '<div class=&quot;widget-title&quot;>',
    		'after_title' => '</div>',
    		'before_widget' => '<div id=&quot;%1$s&quot; class=&quot;widget-wrapper %2$s&quot;>',
    		'after_widget' => '</div>'

    3. Now add widgets to your Questions sidebar and see them magically appear on page :slight_smile:

  • Hakan
    • The Incredible Smush


    I understand now. No, that is not possible with Q&A as it has to use its own templates because it needs the area above the question title too. Directory can use page templates, as it just needs the "content" part of the page/post.

    Regarding sidebar hint, thanks but, Q&A will already use sidebar.php of your theme if there is no sidebar-question.php. Why do you need to copy it again?

  • Joanna
    • Site Builder, Child of Zeus

    I didn't want Q&A to use the sidebar.php of my theme as I wanted different widgets to appear on the Questions page (that focused on Questions stuff) that's why I created the sidebar-question.php (and I couldn't find one in the Q&A plugin folders).

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.