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™
In addition, there are two special functions that can be applied by theme authors before making custom queries: attach_s2member_query_filters(), detach_s2member_query_filters(). These can be used before and after a call to query_posts() for example. s2Member will automatically filter all protected content ( not available to the current User/Member ).
<?php if(is_user_logged_in()){ ?>
Content for anyone that is logged in, regardless of their Membership Level.
<?php } else { ?>
Some public content.
<?php } ?>
<div class="nav">
<?php
if(!is_user_logged_in()) {
if(has_nav_menu('main-menu')) {
wp_nav_menu(array(
'theme_location' => 'main-menu',
'container' => 'ul',
'walker' => new UDS_Menu_Walker
));
} else {
wp_nav_menu(array(
'container' => 'ul'
));
}
} else {
if(has_nav_menu('primary-level'.S2MEMBER_CURRENT_USER_ACCESS_LEVEL)) {
wp_nav_menu(array(
'theme_location' => 'primary-level'.S2MEMBER_CURRENT_USER_ACCESS_LEVEL,
'container' => 'ul',
'walker' => new UDS_Menu_Walker
));
} else {
wp_nav_menu(array(
'container' => 'ul'
));
}
}
?>
</div>
Users browsing this forum: No registered users and 2 guests