Support » Plugin: Question Answer » Add sidebar to single question

  • Resolved melabyte

    (@melabyte)


    Hello,
    I would like to add a sidebar to the single question page (if it is possible a specific sidebar, but it’s not important).
    With the code you provide in the FAQ I was able only to add the white background, how can I set the page not fullwidth?
    Here the screenshot http://imgur.com/a/soV5Z

    Thank you in advance
    Melania

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author PickPlugins

    (@pickplugins)

    Thanks for your post.

    By default single question page will have the sidebar, you can remove or filter by action hook.

    for fixing full width issue please add following code to your theme functions.php file, you will need to replace site-main class and id main by your theme container class and id.

    
    add_action('qa_action_before_single_question', 'qa_action_before_single_question', 10);
    add_action('qa_action_after_single_question', 'qa_action_after_single_question', 10);
    
    function qa_action_before_single_question() {
      echo '<div id="main" class="site-main">';
    }
    
    function qa_action_after_single_question() {
      echo '</div>';
    }
    

    I can help you if you send me the site link.

    Regards

    I thank you for your support.
    It is strange, two days ago I remove a plugin (used for maintenance) and it worked fine, now it has the problem again and the sidebar is not showed.
    Anyway, you can find the single question in this page http://www.galileiani.it/question/domanda-di-prova/

    Thank you very much for your help
    Melania

    Sorry, I forgot.. I also would ask if I can change the slug “question” into “recensione”, if it is possible. Where I can set it?

    Thanks again

    • This reply was modified 2 years, 5 months ago by melabyte.
    Plugin Author PickPlugins

    (@pickplugins)

    #1.

    Please add following Code to fix the full-width issue in single question page

    
    add_action('qa_action_before_single_question', 'qa_action_before_single_question', 10);
    add_action('qa_action_after_single_question', 'qa_action_after_single_question', 10);
    
    function qa_action_before_single_question() {
      echo '<div id="content-holder" class="sidebar-position-right"><div id="content-box">';
    }
    
    function qa_action_after_single_question() {
      echo '</div></div>';
    }
    

    #2. for the translation you will need to contribute in our plugin translation.

    Regards

    • This reply was modified 2 years, 5 months ago by PickPlugins.
    Plugin Author PickPlugins

    (@pickplugins)

    Please read the documentation how to contribute in plugin translations

    https://pickplugins.com/docs/documentation/question-answer/faq/how-to-translate-question-answer/

    Regards

    Thank you for your help, unfortunately it is not correct:
    http://www.galileiani.it/question/domanda-di-prova/
    could you please help me to fix it?

    About the translation, I’m doing it by myself, and as I complete this website I will be glad to contribute!

    Plugin Author PickPlugins

    (@pickplugins)

    Can you please go our forum for further help.

    https://www.pickplugins.com/questions/

    Regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add sidebar to single question’ is closed to new replies.