Q2A: making the main content div appear before the side panel

After checking the Question2Answer pages’ HTML code, I find that the main div comes after the side panel.

How to revert the position of the main div and side panel div? Makes the main content come first in the HTML.

You can change the displaying order by overwriting the body_content() function in the theme (that is, you need to customize the Q2A theme).

Just edit the qa-theme.php file in the theme and adding this function in the class qa_html_theme that extends qa_html_theme_base:

function body_content()

        $this->output('<DIV CLASS="qa-body-wrapper">', '');

        $this->widgets('full', 'top');
        $this->widgets('full', 'high');
        $this->widgets('full', 'low');
        $this->widgets('full', 'bottom');

        $this->output('</DIV> <!-- END body-wrapper -->');

Leave a Reply

Your email address will not be published. Required fields are marked *