Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
1.7k views
in Q2A Core by
by
I created addon for this from below working answer.
http://answers.prothoughts.com/q2a-themes-addons
by
Thanks ProThoughts!

5 Answers

0 votes
by

I'm searching for that too, you can hide it with css but thats not a nice way.

the other option would be to delete it from the code in the file qa-theme-base.php:

function nav_main_sub()
        {
            $this->nav('main');
            $this->nav('sub');
        }

Thats where its produced, but you can't just delete that line, because it will also delete the admin-bar, so we need to get into that nav('sub'); but i dont know how, maybe some experts can help ...

by
This will disable admin submenu.
0 votes
by

If you want to do it with CSS just go to .qa-nav-sub and make it display:none;

by
This will disable admin submenu.
+2 votes
by
in a custom theme or layer:

        function nav($navtype, $level=null)
        {
            if($navtype != 'sub' || $this->template=='admin') {
                qa_html_theme_base::nav($navtype, $level=null);
            }
        }

I haven't tested it, but something like that will work.
by
I tried this, it works! Thanks!
+2 votes
by

You should do it within a custom theme like proposed by NoahY.
If you don't have one you could also modify the core-file:

include/qa-page-questions.php

just delete the following lines


if (!$countslugs)
  $qa_content['navigation']['sub']=qa_qs_sub_navigation($sort);

or change them into the following if you want to show the menu hot only to e.g. moderators:

if (qa_get_logged_in_level()>QA_USER_LEVEL_BASIC)
  if (!$countslugs)
    $qa_content['navigation']['sub']=qa_qs_sub_navigation($sort);

 

0 votes
by

To hide only one (or more) buttons from submenu, edit the file qa-app-q-list.php.

From the function qa_qs_sub_navigation, comment the lines of the button/s you want hide. For example, to hide most votes button:

 

//'votes' => array(
//'label' => qa_lang('main/nav_most_votes'),
//'url' => qa_path_html($request, array('sort' => 'votes')),
//),
 
...