How to stop nav-bar from appearing in the index/home page?

Hi,

1.  I am using version of aalborg theme (and 3 column, I have working on a child theme based on aalborg). However, it shows the nav-bar (activity, birthday, etc) on the index page. How can I stop that?

2.  On the “activity” page, there is owner menu (blog, pages…) how can I remove it only from the activity page?

Thank you.

Bests

  • 1. Related to this discussion: make this:

    if(elgg_in_context('index') || elgg_in_context('main')) {
      $navbar = elgg_view('page/elements/navbar', $vars);
    }

    In your copy of mod\aalborg_theme\views\default\page\default.php

    2. Copy this file vendor\elgg\elgg\views\default\page\elements\sidebar.php to mod\your_theme\views\default\page\elements\sidebar.php

    Now edit it:

    <?php
    
    echo elgg_view_menu('extras', array(
        'sort_by' => 'priority',
        'class' => 'elgg-menu-hz',
    ));
    
    if(!elgg_in_context('activity')) {
      echo elgg_view('page/elements/owner_block', $vars);
    }
    
    echo elgg_view_menu('page', array('sort_by' => 'name'));
    
    if (isset($vars['sidebar'])) {
        echo $vars['sidebar'];
    }

     

    Read the docs

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking