Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

How to set start page to /?qa=questions

+1 vote
when a user typed in the url, it should go directly to url.com/?qa=questions

is there any solution?
asked Jul 18, 2011 in Q2A Core by anonymous

1 Answer

0 votes

It sounds like you want the front page to behave like the questions listing. You can do this by inserting the following in your qa-config.php file (requires Q2A 1.4 or later):

$QA_CONST_PATH_MAP=array(
  'questions' => '',
);
answered Jul 18, 2011 by gidgreen
I implemented this and it adds an extra / every category page i.e.

mathhomeworkanswers.org//algebra-1-answers

Instead of mathhomeworkanswers.org/algebra-1-answers

Any workaround to fix this?
if you already got a custom theme you can hide the additional q&a in the file:
qa-theme.php

class qa_html_theme extends qa_html_theme_base
{
    function nav_list($navigation, $navtype)
    {
      if ($navtype=='nav-main')
      {
        $oldnavigation=$navigation;
        $navigation="";

        // add on any remaining ones
        foreach ($oldnavigation as $key => $navlink){
          if ((!isset($navigation[$key]))&&($key!="qa"))
            {
              $navigation[$key]=$oldnavigation[$key];
            }
        }
      }
        
      qa_html_theme_base::nav_list($navigation, $navtype);
    }
}