Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
841 views
in Plugins by
I am able to move the Ask Box widget to a few spots, but I would really like it just above the main navigation tabs.

I am not a strong backend programmer but I'm no stranger to modifying php.

Any ideas on this?
Q2A version: 1.5.2

1 Answer

+1 vote
by
selected by
 
Best answer

First read abou advanced themes, its very easy

http://www.question2answer.org/themes.php#advanced

Second copy the 2 functions from qa-theme-base.php from the include directory into Your advanced theme-

 

function body_content()
{
$this->body_prefix();
$this->notices();
 
$this->output('<DIV CLASS="qa-body-wrapper">', '');
// THE FOLLOWING LINE IS CHANGED
//$this->widgets('full', 'top');
$this->header();
$this->widgets('full', 'high');
$this->sidepanel();
$this->main();
$this->widgets('full', 'low');
$this->footer();
$this->widgets('full', 'bottom');
 
$this->output('</DIV> <!-- END body-wrapper -->');
 
$this->body_suffix();
}
 
 
 
and the function
 
 
 
function header()
{
$this->output('<DIV CLASS="qa-header">');
 
$this->logo();
$this->nav_user_search();
// THE FOLLOWING LINE IS ADDED
$this->widgets('full', 'top');
$this->nav_main_sub();
$this->header_clear();
 
$this->output('</DIV> <!-- END qa-header -->', '');
}
 
 
You see the changes I made //....
 
That should do the trick.
If still remain some problems please respond again..
Now the location of the top widget is just above the main nav and not longer above the header..

 

by
Thank you! I will try this soon and let you know how it goes!
by
Exactly 2 months later and finally got to get back to this project! And it worked! Thanks for the help. It also gave me some insight to how this all works.
...