1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 how to hide "Forum Tab" and "New Posts"

Discussion in 'XenForo Questions and Support' started by erich37, Mar 7, 2014.

  1. erich37

    erich37 Well-Known Member

    I have set all my Forums to "Private" for guests.
    So only registered members will see the Forums.

    Now I would like to hide the "Forums Tab" and the "New Posts"-Tab (in the SubNavBar) from guests.

    Could you please let me know how in which template I can hide these Tabs ?

    I do not want to hide it with
    display: none !important;

    .... but I want to hide it with
    <xen:if is="{$visitor.user_id}">

    Appreciate your help!

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> navigation
  3. erich37

    erich37 Well-Known Member

    Many thanks Jake!

    Got it.

    <!-- forums -->
            <xen:if is="{$tabs.forums}">
                <li class="navTab forums {xen:if $tabs.forums.selected, 'selected', 'Popup PopupControl PopupClosed'}">
                <xen:if is="{$visitor.user_id}">
                    <a href="{$tabs.forums.href}" class="navLink">{$tabs.forums.title}</a>
                    <a href="{$tabs.forums.href}" class="SplitCtrl" rel="Menu"></a>
                    <div class="{xen:if {$tabs.forums.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} forumsTabLinks">
                        <div class="primaryContent menuHeader">
                            <div class="muted">{xen:phrase quick_links}</div>
                        <ul class="secondaryContent blockLinksList">
                        <xen:hook name="navigation_tabs_forums">
                            <xen:if is="{$visitor.user_id}"><li><a href="{xen:link 'forums/-/mark-read', $forum, 'date={$serverTime}'}" class="OverlayTrigger">{xen:phrase mark_forums_read}</a></li></xen:if>
                            <xen:if is="{$canSearch}"><li><a href="{xen:link search, '', 'type=post'}">{xen:phrase search_forums}</a></li></xen:if>
                            <xen:if is="{$visitor.user_id}">
                                <li><a href="{xen:link 'watched/forums'}">{xen:phrase watched_forums}</a></li>
                                <li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li>
                            <li><a href="{xen:link 'find-new/posts'}" rel="nofollow">{xen:if $visitor.user_id, {xen:phrase new_posts}, {xen:phrase recent_posts}}</a></li>
                    <div class="tabLinks"></div>
    Last edited: Mar 7, 2014

Share This Page