title: Magento hide navigation menu item from guest
body: <p>I'm running a magento custom template on magento community edition 1.7. How do I hide $custom_tab3 from guests? I want that tab to only show up for logged in users. Please see code below. Any help is super highly appreciated!</p>
  
  <pre><code> &lt;ul id="nav"&gt;
      &lt;?php if (Mage::getStoreConfig('celebritysettings/celebritysettings_header/navigation_home')): ?&gt;
       &lt;li class="level0 level-top"&gt;
          &lt;a href="&lt;?php echo $this-&gt;getBaseUrl(); ?&gt;how-it-works"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('How It Works'); ?&gt;&lt;/span&gt;&lt;/a&gt;
       &lt;/li&gt;
   &lt;?php endif; ?&gt;
      &lt;?php
      echo $_menu;
      $custom_tab = Mage::getModel('cms/block')-&gt;load('celebrity_navigation_block');
      if($custom_tab-&gt;getIsActive()) {
          echo '
          &lt;li class="level0 level-top parent custom-block"&gt;
              &lt;a href="'.$this-&gt;getBaseUrl().'gift" class="level-top"&gt;
                  &lt;span&gt;'.$custom_tab-&gt;getTitle().'&lt;/span&gt;
              &lt;/a&gt;
              &lt;div class="sub-wrapper"&gt;'.$this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId('celebrity_navigation_block')-&gt;toHtml().'&lt;/div&gt;
          &lt;/li&gt;';
      }
  
      $custom_tab2 = Mage::getModel('cms/block')-&gt;load('celebrity_navigation_block2');
      if($custom_tab2-&gt;getIsActive()) {
          echo '
          &lt;li class="level0 level-top parent custom-block" &gt;
              &lt;a href="'.$this-&gt;getBaseUrl().'plans" class="level-top"&gt;
                  &lt;span&gt;'.$custom_tab2-&gt;getTitle().'&lt;/span&gt;
              &lt;/a&gt;
              &lt;div class="sub-wrapper"&gt;'.$this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId('celebrity_navigation_block2')-&gt;toHtml().'&lt;/div&gt;
          &lt;/li&gt;';
      }
  
  
      $custom_tab3 = Mage::getModel('cms/block')-&gt;load('celebrity_navigation_block3');
      if($custom_tab3-&gt;getIsActive()) {
          echo '
          &lt;li class="level0 level-top parent custom-block"&gt;
              &lt;a href="'.$this-&gt;getBaseUrl().'showroom" class="level-top"&gt;
                  &lt;span&gt;'.$custom_tab3-&gt;getTitle().'&lt;/span&gt;
              &lt;/a&gt;
              &lt;div class="sub-wrapper"&gt;'.$this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId('celebrity_navigation_block3')-&gt;toHtml().'&lt;/div&gt;
          &lt;/li&gt;';
      }
  
  
      $custom_tab4 = Mage::getModel('cms/block')-&gt;load('celebrity_navigation_block4');
      if($custom_tab4-&gt;getIsActive()) {
          echo '
          &lt;li class="level0 level-top parent custom-block"&gt;
              &lt;a href="'.$this-&gt;getBaseUrl().'magazine" class="level-top"&gt;
                  &lt;span&gt;'.$custom_tab4-&gt;getTitle().'&lt;/span&gt;
              &lt;/a&gt;
              &lt;div class="sub-wrapper"&gt;'.$this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId('celebrity_navigation_block4')-&gt;toHtml().'&lt;/div&gt;
          &lt;/li&gt;';
      }
  
      ?&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p></p>