PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
add_theme_support("nav-menus");
register_nav_menu ("primary-public", "Primary Menu ( public )");
register_nav_menu ("primary-level0", "Primary Menu ( Level #0 )");
register_nav_menu ("primary-level1", "Primary Menu ( Level #1 )");
register_nav_menu ("primary-level2", "Primary Menu ( Level #2 )");
register_nav_menu ("primary-level3", "Primary Menu ( Level #3 )");
register_nav_menu ("primary-level4", "Primary Menu ( Level #4 )");
if(!is_user_logged_in()){
wp_nav_menu (array ("theme_location" => "primary-public"));
} else {
$level = S2MEMBER_CURRENT_USER_ACCESS_LEVEL;
wp_nav_menu (array ("theme_location" => "primary-level-".$level));
}
if(is_permitted_by_s2member ($ID, "singular"))
// display in menu
else
// bypass, they don't have access.
register_nav_menu ("primary-public", "Primary Menu ( public )");
register_nav_menu ("primary-level-0", "Primary Menu ( Level #0 )");
register_nav_menu ("primary-level-1", "Primary Menu ( Level #1 )");
register_nav_menu ("primary-level-2", "Primary Menu ( Level #2 )");
register_nav_menu ("primary-level-3", "Primary Menu ( Level #3 )");
register_nav_menu ("primary-level-4", "Primary Menu ( Level #4 )");
<div id="navmenu">
<?php
get_template_part('nav',tech_nav_select());
}
if ($tech['nav_menu_type'] != "Disable" && $tech_disable_nav != "checked") {
if ($tech['dashboard_link'] == "On") {
if (is_user_logged_in()) { ?>
<ul id="admin"><li><a href="<?php echo site_url(); ?>/wp-admin" title="<?php _e('Dashboard' ,'techozoic')?>"><?php _e('Dashboard' ,'techozoic')?></a></li>
<li><a href="<?php echo wp_logout_url(); ?>" title="<?php _e('Log Out' ,'techozoic')?>"><?php _e('Log Out' ,'techozoic')?></a></li></ul>
<?php
} else { ?>
<ul id="admin"><li>
<?php if ($tech['thickbox'] =="On") {
?>
<a href="#TB_inline?height=120&width=120&inlineId=loginthick" class="thickbox" title="Login"><?php _e('Login' ,'techozoic')?></a>
<?php } else {
?> <a href="<?php echo wp_login_url();?>" title="<?php _e('Login' ,'techozoic')?>"><?php _e('Login' ,'techozoic')?></a>
<?php }
?>
</li></ul>
<?php
if(!is_user_logged_in()){
wp_nav_menu (array ("theme_location" => "primary-public"));
} else {
$level = S2MEMBER_CURRENT_USER_ACCESS_LEVEL;
wp_nav_menu (array ("theme_location" => "primary-level-".$level));
}
?>
<div id="loginthick" style="display:none">
<div class="aligncenter">
<form action="<?php echo site_url(); ?>/wp-login.php" method="post" id="loginform">
<label><?php _e('Username: ' ,'techozoic')?><br /><input type="text" id="user_login" class="text" name="log"/></label><br />
<label><?php _e('Password: ' ,'techozoic')?><br /><input type="password" id="user_pass" class="text" name="pwd"/></label><br />
<input type="submit" id="wp-submit" value="<?php _e('Log in' ,'techozoic')?>" />
<input type="hidden" name="redirect_to" value="<?php echo "http://".$_SERVER["SERVER_NAME"].$_SERVER['REQUEST_URI']; ?>" />
<input type="hidden" name="testcookie" value="1" />
</form>
</div><!--end aligncenter-->
</div><!--end loginthick-->
<?php }
}
?>
</div><!--end navmenu-->
Return to Common Questions/Problems/Tips
Users browsing this forum: No registered users and 2 guests