• Resolved milkfishpl

    (@milkfishpl)


    Hi. my problem is with site https://offcorner.nstrefa.pl/whats/
    I want to hide top menu

    * to the beginning
    home
    * your own
    profile
    * friends or group
    activity
    * you can
    create group
    * your and others
    groups
    * inbox or compose
    message

    whitch is a link list to buddypress. Menu is not a plugin or widget, simply text links, and i know i should modyfy header.php but i dont know how. Please help me with that.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Without seeing the code of your header.php I could not tell you what to edit, but you can hide that top menu by adding this line to the end of your CSS file:

    #menu { display: none; }

    Thread Starter milkfishpl

    (@milkfishpl)

    <ul id="menu">
    				<li><a href="<?php echo get_option('home'); ?>/" <?php if(is_home()) {echo 'class="selected"';} ?>><span>to the beginning</span><br />home</a></li>
                    				<li><a href="https://offcorner.nstrefa.pl/whats/members/admin/profile/"><span>your own</span><br />profile</a></li>
                    				<li><a href="https://offcorner.nstrefa.pl/whats/members/admin/activity/"><span>friends or group</span><br />activity</a></li>
                    				<li><a href="https://offcorner.nstrefa.pl/whats/groups/create/step/group-details/"><span>you can</span><br />create group</a></li>
                    				<li><a href="https://offcorner.nstrefa.pl/whats/groups/"><span>your and others</span><br />groups</a></li>
                    				<li class="last"><a href="https://offcorner.nstrefa.pl/whats/members/admin/messages/"><span>inbox or compose</span><br />message</a></li>
    
    			</ul>

    i want to hide this only for not loged in user….

    This should work:

    <br />
    <pre><code><?php if ( is_user_logged_in() ) {
        <ul id="menu">
        <li><a href="<?php echo get_option('home'); ?>/" <?php if(is_home()) {echo 'class="selected"';} ?>><span>to the beginning</span><br />home</a></li>
        <li><a href="https://offcorner.nstrefa.pl/whats/members/admin/profile/"><span>your own</span><br />profile</a></li>
        <li><a href="https://offcorner.nstrefa.pl/whats/members/admin/activity/"><span>friends or group</span><br />activity</a></li>
        <li><a href="https://offcorner.nstrefa.pl/whats/groups/create/step/group-details/"><span>you can</span><br />create group</a></li>
        <li><a href="https://offcorner.nstrefa.pl/whats/groups/"><span>your and others</span><br />groups</a></li>
        <li class="last"><a href="https://offcorner.nstrefa.pl/whats/members/admin/messages/"><span>inbox or compose</span><br />message</a></li>
        </ul>
    <?php } ?>
    Thread Starter milkfishpl

    (@milkfishpl)

    Parse error: syntax error, unexpected ‘<‘ in /home/offcorne/public_html/whats/wp-content/themes/wu-wei/header.php on line 30

    For some reason, my code got messed up when I posted it the first time, but this is what you need.

    <?php if ( is_user_logged_in() ) { ?>
        <ul id="menu">
        <li><a href="<?php echo get_option('home'); ?>/" <?php if(is_home()) {echo 'class="selected"';} ?>><span>to the beginning</span><br />home</a></li>
        <li><a href="https://offcorner.nstrefa.pl/whats/members/admin/profile/"><span>your own</span><br />profile</a></li>
        <li><a href="https://offcorner.nstrefa.pl/whats/members/admin/activity/"><span>friends or group</span><br />activity</a></li>
        <li><a href="https://offcorner.nstrefa.pl/whats/groups/create/step/group-details/"><span>you can</span><br />create group</a></li>
        <li><a href="https://offcorner.nstrefa.pl/whats/groups/"><span>your and others</span><br />groups</a></li>
        <li class="last"><a href="https://offcorner.nstrefa.pl/whats/members/admin/messages/"><span>inbox or compose</span><br />message</a></li>
        </ul>
    <?php } ?>
    Thread Starter milkfishpl

    (@milkfishpl)

    thank you! thats great!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide links in menu’ is closed to new replies.