Sidebar menu

How can I hide the sidebar menu of my website , the website is been created using Elgg, I have the teacher panel, student panel, Parent panel all these three can be changed or can remove the sidebar menu items,
But I am not able to remove the sidebar of employee or admin,
Please anyone can help me with this

  • Add in your custom plugin these files:


    With this content:


    Flush the caches

  • As i checked in the directory, It has the sidebar.php file But inside the file the code is as below

     * Elgg sidebar contents
     * @uses $vars['sidebar'] Optional content that is displayed at the bottom of sidebar
    echo elgg_view_menu('extras', array(
    'sort_by' => 'priority',
    'class' => 'elgg-menu-hz',
    echo elgg_view('page/elements/user_block', $vars);
    echo elgg_view_menu('page', array('sort_by' => 'priority'));
    /*echo elgg_view_menu('side-menu1', array('sort_by' => 'priority', 'class' => 'side-menu'));
    echo elgg_view_menu('side-menu2', array('sort_by' => 'priority', 'class' => 'side-menu'));
    echo elgg_view_menu('side-menu3', array('sort_by' => 'priority', 'class' => 'side-menu'));
    echo elgg_view_menu('side-menu4', array('sort_by' => 'priority', 'class' => 'side-menu'));
    echo elgg_view_menu('side-menu5', array('sort_by' => 'priority', 'class' => 'side-menu'));
    // optional 'sidebar' parameter
    if (isset($vars['sidebar'])) {
    echo $vars['sidebar'];
    // @todo deprecated so remove in Elgg 2.0
    // optional second parameter of elgg_view_layout
    if (isset($vars['area2'])) {
    echo $vars['area2'];
    // @todo deprecated so remove in Elgg 2.0
    // optional third parameter of elgg_view_layout
    if (isset($vars['area3'])) {
    echo $vars['area3'];
  • If your goal is to remove all sidebars completely from your site then do as I said in the previous reply.

    Remove all code from the existing file (sidebar.php) and add only:


    Clean the caches after this changes.