+4 votes
in CMS Tips by (71.8k points)
Donut theme of Question2Answer CMS shows two instances of "Categories" widget on the sidebar. How can I remove one instance of the widget?

1 Answer

+1 vote
by (348k points)
selected by
 
Best answer

This is a bug in the Donut theme of Q2A CMS. By default, "Categories" is enabled as a sidebar widget in the CMS. But the Donut theme has additional logic to add "Categories" widget to the sidebar. That's why two instances of the widget are shown in the Donut theme.

To disable the additional "Categories" widget shown due to logic in the Donut theme, you need to comment out a line in the Donut theme code.

Open the file "qa-theme/Donut-theme/qa-donut-layer.php" and search for "function sidepanel()" and comment out "$this->nav( 'cat', 1 ); "

        function sidepanel()
        {
            $this->output( '<div class="qa-sidepanel col-md-3 col-xs-12 pull-right">' );
            $this->output( '<div class="side-search-bar hidden-xs">' );
            $this->search();
            $this->output( '</div>' );
            $this->widgets( 'side', 'top' );
            $this->sidebar();
            $this->widgets( 'side', 'high' );
            //$this->nav( 'cat', 1 );  // To remove one instance of categories widget
            $this->widgets( 'side', 'low' );
            $this->output_raw( @$this->content['sidepanel'] );
            $this->feed();
            $this->widgets( 'side', 'bottom' );
            $this->output( '</div>', '' );
        }


...