latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Logged in/out menus

Home Forums Community Forum Logged in/out menus

This topic contains 14 replies, has 5 voices. Last updated by  Raam Dev 4 years, 8 months ago.

Topic Author Topic
Posted: Tuesday Apr 17th, 2012 at 10:24 pm #11056

List Of Topic Replies

Viewing 14 replies - 1 through 14 (of 14 total)
Author Replies
Author Replies
Posted: Tuesday Apr 17th, 2012 at 11:56 pm #11063
[s2If is_user_logged_in()]
    Content for anyone that is logged in, regardless of their Membership Level.
[/s2If]

[s2If !is_user_logged_in()]
    Some public content. They're NOT logged in.
        A leading !exclamation means false.
[/s2If]
Posted: Wednesday Apr 18th, 2012 at 8:42 am #11104
Eduan
Username: Eduan
Moderator

Hello there, thanks for your inquiry.

What Philly showed you is what you need, they’re s2Member shortcode conditionals.

You might be interested in this KBA (Knowledge Base Article) on s2Member conditionals:
Knowledge Base » s2Member® Conditionals

Hope this helps. :)

Posted: Wednesday Apr 18th, 2012 at 9:43 am #11108

Thank you for pointing me to shortcode conditionals.

My question is about how to get s2 to manage the wp main menu.

See your own s2 website. Look at the main menu. I am trying to replicate similar conditional functionality using the main menu.

How can I get s2 to manage the main menu items conditional on user’s login status ?

if user is already logged in > hide registration link
if user is already logged in > show profile link

if user is not logged in > show login link

Posted: Wednesday Apr 18th, 2012 at 9:48 am #11110

That will take a little more work

This link will show you how to achieve that

http://www.s2member.com/forums/topic/alternate-menu-for-members-part-2/

Posted: Wednesday Apr 18th, 2012 at 9:51 am #11113
Eduan
Username: Eduan
Moderator

Excellent Philly!

Thanks for the link. :)

Posted: Wednesday Apr 18th, 2012 at 12:01 pm #11121

Thanks very much Philly. I am using a custom theme which has a main menu but the functions.php file does not seem standard.

So I’m not sure how to register both menus. If it’s any help here is the contents of my functions.php. Any help would be appreciated.

<?php
	//Load the Lenguage for the theme.
	load_theme_textdomain( 'eneaa', TEMPLATEPATH.'/languages' );

	$locale = get_locale();
	$locale_file = TEMPLATEPATH."/languages/$locale.php";
	if ( is_readable($locale_file) )
		require_once($locale_file);
	//--------------------------------
		

	// Add RSS links to <head> section
	//automatic_feed_links();
	
	// Load jQuery
	
	if ( !is_admin() ) {
	   wp_deregister_script('jquery');
	   wp_register_script('jquery', ("https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"), false);
	   wp_enqueue_script('jquery');
	}
	
	
	
	

	
	// Clean up the <head>
	// remove some WP defaults
	function removeHeadLinks() {
		// remove simple discovery link
		remove_action('wp_head', 'rsd_link');
		// remove windows live writer link
		remove_action('wp_head', 'wlwmanifest_link');
		// remove the version number
		remove_action('wp_head', 'wp_generator');
		// remove header links
	}
	add_action('init', 'removeHeadLinks');
	// Add RSS links to <head> section
	add_theme_support('automatic-feed-links');
	
	
	
	//Custom Comments
	require_once (TEMPLATEPATH . "/framework/custom-comments.php");
	
	
	
	
	//Add Menu Manager---------------------------
	add_theme_support( 'nav-menus' );
	add_action( 'init', 'register_my_menus' );
	function register_my_menus() {
	register_nav_menus(
	array(
	'menu-1' => __( 'Navigation Menu' )
		)
					);
	}
	//End Menu Manager---------------------------
    


	
	//Widgets Areas
	require_once (TEMPLATEPATH . "/framework/widgets-areas.php");
	
	//Custom Styles from Admin Panel
	require_once (TEMPLATEPATH . "/framework/theme_scripts/styles.php");
	
	//Custom Widgets
	require_once (TEMPLATEPATH . "/framework/widgets/social-share-widget.php");
	require_once (TEMPLATEPATH . "/framework/widgets/related-posts.php");
	require_once (TEMPLATEPATH . "/framework/widgets/social.php");
	require_once (TEMPLATEPATH . "/framework/widgets/contact-info.php");
	require_once (TEMPLATEPATH . "/framework/widgets/quick-contact.php");
	require_once (TEMPLATEPATH . "/framework/widgets/twitter-widget.php");
	require_once (TEMPLATEPATH . "/framework/widgets/advertisement_125.php");
	//require_once (TEMPLATEPATH . "/framework/widgets/about_author_widget.php");
	require_once (TEMPLATEPATH . "/framework/widgets/most-popular.php");
	//require_once (TEMPLATEPATH . "/framework/widgets/testimonials.php");
	require_once (TEMPLATEPATH . "/framework/widgets/tags.php");
	require_once (TEMPLATEPATH . "/framework/widgets/suscribe_twitter_btn.php");
	
	//Sidebar Generator
	require_once (TEMPLATEPATH . "/framework/portfolio_generator.php");
	
	//Custom Posts Types
	require_once (TEMPLATEPATH . "/framework/post_types/slider-post-types.php");
	require_once (TEMPLATEPATH . "/framework/post_types/portfolio-post-types.php");
	
	
	
	//Breadcrumbs
	require_once (TEMPLATEPATH . "/framework/breadcrumbs.php");
	
	//Theme Pagination
	require_once (TEMPLATEPATH . "/framework/pagination.php");
	
	
	
	//Sidebar Generator
	require_once (TEMPLATEPATH . "/framework/sidebar_generator.php");
	
	
	
	//Set the Full Width Image value
	if ( ! isset( $content_width ) ) $content_width = 900;
	
	
	
function excerpt($num) {
$limit = $num+1;
$excerpt = explode(' ', get_the_excerpt(), $limit);
array_pop($excerpt);
$excerpt = implode(" ",$excerpt)."...";
return $excerpt;
}

function content($limit) {
  $content = explode(' ', get_the_content(), $limit);
  if (count($content)>=$limit) {
    array_pop($content);
    $content = implode(" ",$content).'...';
  } else {
    $content = implode(" ",$content);
  }	
  $content = preg_replace('/\[.+\]/','', $content);
  $content = apply_filters('the_content', $content); 
  $content = str_replace(']]>', ']]&gt;', $content);
  return $content;
}


//Function to retrive the image when are uploaded with a Meta Box
function get_meta_image($post_id, $field) {
				 global $wpdb;
				 $query = "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'attachment' AND post_parent = %d";
				 return $wpdb->get_col($wpdb->prepare($query,$post_id));
}



	





	




/*-----------------------------------------------------------------------------------*/
/* Options Framework Functions
/*-----------------------------------------------------------------------------------*/

/* Set the file path based on whether the Options Framework is in a parent theme or child theme */

if ( STYLESHEETPATH == TEMPLATEPATH ) {
	define('OF_FILEPATH', TEMPLATEPATH);
	define('OF_DIRECTORY', get_template_directory_uri()."/framework");
} else {
	define('OF_FILEPATH', STYLESHEETPATH);
	define('OF_DIRECTORY', get_template_directory_uri()."/framework");
}

/* These files build out the options interface.  Likely won't need to edit these. */

require_once (OF_FILEPATH . '/framework/admin/admin-functions.php');		// Custom functions and plugins
require_once (OF_FILEPATH . '/framework/admin/admin-interface.php');		// Admin Interfaces (options,framework, seo)

/* These files build out the theme specific options and associated functions. */

require_once (OF_FILEPATH . '/framework/admin/theme-options.php'); 	// Options panel settings and custom settings
require_once (OF_FILEPATH . '/framework/admin/theme-functions.php'); 	// Theme actions based on options settings
/*-----------------------------------------------------------------------------------*/

	
	
	
	
	
//Shortcodes
require_once (OF_FILEPATH . '/framework/shortcodes/columns.php'); //Columns
require_once (OF_FILEPATH . '/framework/shortcodes/lightbox.php'); //Lightbox
require_once (OF_FILEPATH . '/framework/shortcodes/video.php'); //Video
require_once (OF_FILEPATH . '/framework/shortcodes/typography.php'); //Typography
require_once (OF_FILEPATH . '/framework/shortcodes/buttons.php'); //Buttons
require_once (OF_FILEPATH . '/framework/shortcodes/cool_buttons.php'); //Buttons
require_once (OF_FILEPATH . '/framework/shortcodes/tabs.php'); //Tabs
require_once (OF_FILEPATH . '/framework/shortcodes/frames.php'); //Frames
require_once (OF_FILEPATH . '/framework/shortcodes/boxes.php'); //Boxes
require_once (OF_FILEPATH . '/framework/shortcodes/map.php'); //Map
require_once (OF_FILEPATH . '/framework/shortcodes/form.php'); //Form
require_once (OF_FILEPATH . '/framework/shortcodes/slogan.php'); //Slogan
require_once (OF_FILEPATH . '/framework/shortcodes/icon.php'); //Icon
require_once (OF_FILEPATH . '/framework/shortcodes/space_divider.php'); //Space Divider
require_once (OF_FILEPATH . '/framework/shortcodes/toggle.php'); //Toggle
require_once (OF_FILEPATH . '/framework/shortcodes/divider.php'); //Divider
require_once (OF_FILEPATH . '/framework/shortcodes/testimonials.php'); //testimonials
require_once (OF_FILEPATH . '/framework/shortcodes/sliding.php'); //testimonials



//Meta Boxes
require_once (OF_FILEPATH . '/framework/meta_boxes/meta-box.php');
require_once (OF_FILEPATH . '/framework//meta_boxes/meta-box-usage.php');
	
	

//Long posts should require a higher limit, see http://core.trac.wordpress.org/ticket/8553
@ini_set('pcre.backtrack_limit', 500000);

//Cufon Functions
require_once (OF_FILEPATH . '/framework/cufon_functions.php'); 

?>
Posted: Wednesday Apr 18th, 2012 at 1:07 pm #11128

Can you please also post the contents of your

header.php

Firstly though I can see in your other post your having trouble logging out, you may want to find out if the theme your using is compatible with s2member? Can you disable your plugins, clear the browser cache then try logging out, if that fails to work can you switch to the default wordpress theme and see if your able to log out

Posted: Wednesday Apr 18th, 2012 at 1:25 pm #11129

Sure thing, thanks for the assist. Here’s header.php below. The theme is Black Label

About the logging out issue – it does not seem theme related as I have tried again with a fresh wp install and default themes and same problem. I’m wondering if it’s a MAMP related thing. I will try publishing the site to a live host and see if the logout issue is resolved. I have not had this happen on live sites in the past.

<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8" <?php language_attributes(); ?>> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->

	<head>

		
		<meta charset="<?php bloginfo('charset'); ?>">
        <!--[if lt IE 9]>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <![endif]-->
        
        <?php if (is_search()) { ?>
	   	<meta name="robots" content="noindex, nofollow" /> 
		<?php } ?>
        
		<title>
		   <?php
	/*
	 * Print the <title> tag based on what is being viewed.
	 */
	global $page, $paged;

	wp_title( '|', true, 'right' );

	// Add the blog name.
	bloginfo( 'name' );

	// Add the blog description for the home/front page.
	//$site_description = get_bloginfo( 'description', 'display' );
	//if ( $site_description && ( is_home() || is_front_page() ) )
		//echo " | $site_description";

	// Add a page number if necessary:
	if ( $paged >= 2 || $page >= 2 )
		echo ' | ' . sprintf( __( 'Page %s', 'eneaa' ), max( $paged, $page ) );

	?>
		</title>
		<meta name="description" content="<?php bloginfo('description'); ?>">
        
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />


        <!-- 960Grid -->
        <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/960.css" />
        
        <!-- Dropdown Menu & Shortcodes Styles -->
        <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/shortcodes_and_menu.css" />
        
        <!-- Tabs -->
        <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/tabs.css" />        


		<?php 
        $global_style = get_option('of_global_style');
		if($global_style == 'Light'){
		?>
        <!-- General Styles Light -->   
        <link class="css_light" rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/light_skin.css" />
        <?php 
		}else{
		?>
        <!-- General Styles Dark -->
        <link class="css_dark" rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
        <?php 
		}
		?>
        
        
        <!-- Preloader -->
        <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/preloader.css" />
        
        <!-- prettyPhoto -->
    	<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/prettyPhoto.css" />
        
        
        
        <!-- html5shiv -->
        <!--[if lt IE 9]>
        	<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        
        
        
        
         <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary 
		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
		<script>window.jQuery || document.write(unescape('%3Cscript src="<?php echo get_template_directory_uri(); ?>/js/jquery-1.5.2.min.js"%3E%3C/script%3E'))</script>
        -->
        
        <!-- WP_Head -->
        	<?php wp_head(); ?>
        <!-- /WP_Head -->
        
       
        
        <!-- SWF Object -->
        <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/swfobject.js"></script>
        
        <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery.jplayer.min.js"></script>
        
        
        <?php $map_key = get_option('of_gmaps_key');
		if($map_key){
		?>
        <!-- Google Maps -->
		<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo get_option('of_gmaps_key'); ?>"></script>
		<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery.gmap-1.1.0-min.js"></script>
		<?php } ?>
        
        
        <!-- Scripts from Admin Panel & Portfolios -->
		<?php include (TEMPLATEPATH . '/framework/theme_scripts/scripts.php' ); ?>
        
        <!-- adds the comment-reply JavaScript to the single post pages -->
        <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
        
        
        <!-- Facebook Tags -->
        <?php 
		if(is_single()){
		if (have_posts()) : 
		while (have_posts()) : the_post(); 
        $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
		endwhile; 
		endif;
		$facebook_id = get_option('of_facebook_id');
		?>
        <meta property="og:title" content="<?php wp_title("",true); ?>" />
        <meta property="og:type" content="product" />
        <meta property="og:url" content="<?php the_permalink(); ?>" />
        <meta property="og:image" content="<?php echo $thumbnail[0]; ?>" />
        <meta property="og:site_name" content="<?php bloginfo('name'); ?>" />
        <meta property="fb:admins" content="<?php echo $facebook_id; ?>" />
        <?php } ?>
       
        

		


	</head>
	<body <?php body_class(); ?>>

 <div id="wrap">
    <div id="container" class="<?php if (!is_page_template('home-page.php')) {echo "inner_page"; } ?> container_12">
   			

    
    	<header id="header" class="grid_12">
        
        	
            	<h1><a href="<?php echo home_url(); ?>/"><?php if($logo = get_option('of_logo')){ ?><img src="<?php echo $logo; ?>" alt="<?php bloginfo('name'); ?>"  /><?php }else{ bloginfo('name');}?></a></h1>
            
            
            
            <nav id="nav" class="jqueryslidemenu">            	
							<?php            
                                    wp_nav_menu( array( 
                                                               
                                        'theme_location'  => 'menu-1',
                                        'container'       => false
                                              
                                    )); 
                            ?>
                            <div class="clear"></div>
             </nav>
                         <div class="clear"></div>
             
            
        </header>
        
    <?php 
	//Get the page ID even if is the Blog Page
				global $wp_query;
				$page_id = $wp_query->get_queried_object_id();
				
	$background_image = get_post_meta($page_id, 'mb_background_image', true);
	$src = wp_get_attachment_image_src($background_image, 'full');
	
	//Audio---------------------------------
	$background_audio = get_post_meta($page_id, 'mb_background_audio', true);
	$background_audio_format = get_post_meta($page_id, 'mb_background_audio_format', true);
	
	if (is_page_template('home-page-youtube.php')) {//REMOVE
		$background_video = "http://www.youtube.com/watch?v=aXLDyVp0rVg";//REMOVE
	}elseif(is_page_template('home-page-vimeo.php')){//REMOVE
		$background_video = "http://vimeo.com/25968181";//REMOVE
	}else{//REMOVE
		$background_video = get_post_meta($page_id, 'mb_background_video', true);//KEEP
	}//REMOVE
	
	
	
	
	
	if($background_video != "" AND !is_page_template('home-page-slider.php')){
		$video_autostart = get_option('of_video_autostart'); 
		$video_controlbar = get_option('of_video_controlbar'); 
		$video_stretching = get_option('of_video_stretching'); 
		$video_bufferlength = get_option('of_video_bufferlength'); 
		$video_repeat = get_option('of_video_repeat'); 
		?>
		
		
		<?php
		
		//If is a Vimeo Video----------------------------------------------
		if (preg_match("/vimeo/i", $background_video)) {
			
			//Get the path of the URL
			$vimeo_video = parse_url($background_video, PHP_URL_PATH);
			
			//Remove "/" if is in the URL at the end or beggining
			$vimeo_video = trim($vimeo_video, "/");	
			
		?>
		    <div id="video_bck">
               	
        	<iframe id="video" src="http://player.vimeo.com/video/<?php echo $vimeo_video; ?>?title=0&amp;byline=0&amp;portrait=0&amp;autoplay=<?php if($video_autostart == 'false'){ echo 0;}else{echo 1;} ?>&amp;loop=<?php if($video_repeat == 'none'){ echo 0;}else{echo 1;} ?>" width="400" height="170" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>
        	</div>
        	<script type="text/javascript"> 
				//<![CDATA[
                jQuery(document).ready(function($) {  
                	var w_height = $(window).height();
					var w_width = $(window).width();
					var $vimeo_video = $("#video");
					
                	$vimeo_video.width(w_width);
                	$vimeo_video.height(w_height);
                	
                	$("#navigation").hide();
                 
                 });
				 //]]>
            </script>
        <?php  
		} else {//If not Vimeo---------------------------------------------
		?>
        	
             <div id="video_bck">
               	<div id="video"></div> 
                <script type="text/javascript"> 
                jQuery(document).ready(function($) {  
					var w_height = $(window).height();
					var w_width = $(window).width();
					$("#navigation").hide();
                    jwplayer("video").setup({ 
                    flashplayer: "<?php echo get_template_directory_uri(); ?>/jwplayer/player.swf", 
                    file: "<?php echo $background_video; ?>", 
                    controlbar: '<?php if($video_controlbar == "true"){echo 'over';}else{echo 'none';}?>',
                    stretching: "<?php echo $video_stretching; ?>",
						<?php 
						if($global_style == 'Light'){
						?>
						skin: "<?php echo get_template_directory_uri(); ?>/css/simple.zip",
						<?php 
						}else{
						?>
						skin: "<?php echo get_template_directory_uri(); ?>/css/glow.zip",
						<?php 
						}
						?>
						/*	
					youtube: [
							{ quality: "medium"}
							],
						*/
                    autostart: <?php echo $video_autostart; ?>,
                    bufferlength: <?php echo $video_bufferlength; ?>,
					repeat: "<?php echo $video_repeat; ?>",
					<?php if (is_page_template('home-page-html5.php')) {//REMOVE ?>
					modes: [
							{ type: "html5"
							},
							{ type: "flash", 
							  src: "<?php echo get_template_directory_uri(); ?>/jwplayer/player.swf"
							},
							{ type: "download" }
						],
					<?php } ?>
					
					events: { onComplete: function() { 
					
						<?php if($video_repeat == "none"){ ?>
                        jwplayer("video").remove(); 
                        $("#video_bck").remove();
						$("#navigation").show();
						<?php } ?>
						
						<?php if($background_audio != ""){?>

							$("#jquery_jplayer_1").show();
							$("#jp_interface_1").show();
						 	$("#jquery_jplayer_1").jPlayer({
								ready: function () {
									$(this).jPlayer("setMedia", {
										<?php echo $background_audio_format; ?>: "<?php echo $background_audio; ?>"
									}).jPlayer("play");
								},
								ended: function (event) {
									$(this).jPlayer("play");
								},
								//solution: "flash, html", // Flash with an HTML5 fallback.
								swfPath: "<?php echo get_template_directory_uri(); ?>/js/",
								supplied: "<?php echo $background_audio_format; ?>"
							});
						<?php }//End if Audio ?> 
						
						 
                    } },
                    height: w_height,
                    width: w_width }); 
                 });
                </script>
                
            </div><!-- /video_bck -->
            
            <?php
			}//If not Vimeo
			?>
        
        <?php }else{ 
			//Audio Player-----------------------------------------------------------------------------------
        	if($background_audio != ""){
			?>
			
            <script type="text/javascript">
            jQuery(document).ready(function($) {
				$("#jquery_jplayer_1").show();
				$("#jp_interface_1").show();
             $("#jquery_jplayer_1").jPlayer({
                    ready: function () {
                        $(this).jPlayer("setMedia", {
                            <?php echo $background_audio_format; ?>: "<?php echo $background_audio; ?>"
                        }).jPlayer("play");
                    },
                    ended: function (event) {
                        $(this).jPlayer("play");
                    },
                    //solution: "flash, html", // Flash with an HTML5 fallback.
                    swfPath: "<?php echo get_template_directory_uri(); ?>/js/",
                    supplied: "<?php echo $background_audio_format; ?>"
                });
            });
            </script>
            <?php } //End if Audio
			//Audio Player-----------------------------------------------------------------------------------
			
		}//Else Video
		
		if(!is_page_template('gallery-fullscreen.php')){
		
		
		$slider_autoplay = get_option('of_slider_autoplay'); 
		$slider_slide_interval = get_option('of_slider_slide_interval'); 
		$slider_speed_transition = get_option('of_slider_speed_transition'); 
		$slider_transition = get_option('of_slider_transition'); 
		$slider_pausehover = get_option('of_slider_pausehover'); 
		$slider_navigation = get_option('of_slider_navigation');
		$slider_verticalcenter = get_option('of_slider_verticalcenter');
		$slider_horizontalcenter = get_option('of_slider_horizontalcenter'); 
		
		?>
        
           <!-- Supersized -->
            <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/supersized.css" />
            
            <script type="text/javascript">
            jQuery(document).ready(function($) {  
					
                    jQuery(function($){
                            $.supersized({
                                //Functionality
                                slideshow               :   1,		//Slideshow on/off
                                autoplay				:	<?php echo $slider_autoplay; ?>,		//Slideshow starts playing automatically
                                start_slide             :   1,		//Start slide (0 is random)
                                random					: 	0,		//Randomize slide order (Ignores start slide)
                                slide_interval          :   <?php echo $slider_slide_interval; ?>,	//Length between transitions
                                transition              :   <?php echo $slider_transition; ?>, 		//0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
                                transition_speed		:	<?php echo $slider_speed_transition; ?>,	//Speed of transition
                                new_window				:	0,		//Image links open in new window/tab
                                pause_hover             :   <?php echo $slider_pausehover; ?>,		//Pause slideshow on hover
                                keyboard_nav            :   1,		//Keyboard navigation on/off
                                performance				:	1,		//0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit)
                                image_protect			:	1,		//Disables image dragging and right click with Javascript
                                image_path				:	'<?php echo get_template_directory_uri(); ?>/images/', //Default image path
            
                                //Size & Position
                                min_width		        :   0,		//Min width allowed (in pixels)
                                min_height		        :   0,		//Min height allowed (in pixels)
                                vertical_center         :   <?php echo $slider_verticalcenter; ?>,		//Vertically center background
                                horizontal_center       :   <?php echo $slider_horizontalcenter; ?>,		//Horizontally center background
                                fit_portrait         	:   1,		//Portrait images will not exceed browser height
                                fit_landscape			:   0,		//Landscape images will not exceed browser width
                                
                                //Components
                                navigation              :   <?php echo $slider_navigation; ?>,		//Slideshow controls on/off
                                thumbnail_navigation    :   0,		//Thumbnail navigation
                                slide_counter           :   0,		//Display slide numbers
                                slide_captions          :   0,		//Slide caption (Pull from "title" in slides array)
                                slides					:   [ 		//Background image
                                                                    <?php if($background_image != ""){ ?>
                                                                        { image : '<?php echo $src[0]; ?>' }
                                                                    <?php }else{
																	
																		//Last to First
																		//query_posts(array('post_type'=>'slides')); 
																		
																		//First to Last
																		query_posts('post_type=slides&order=ASC&posts_per_page=-1'); 
																		$output = "";
																		$n= 0;
																			//Loop for Post Types Slides
																			if ( have_posts() ) while ( have_posts() ) : the_post();
																			$n++;
																				//Slide Image
																				$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
																				//Get the Slide meta info
																				$slide_link = get_post_meta(get_the_ID(), 'mb_slide_link', true);
																			   
																			
																				$output.="{"; 
																				$output.="image : '". $thumbnail[0] ."'"; 
																				 if($slide_link != ''){
																					  $output.="  , url : '". $slide_link." '";
																					    } ;
																				$output.="},";
																			
																			
																			 endwhile; 
																			 if($n > 1){
																			  $output = substr ($output, 0, -1);
																			 }
																			 echo $output;
																			// Reset the global $the_post as this query will have stomped on it
																			wp_reset_query();
																			?>

                                                                    <?php } //else ?>
                                                            ]
                                        
                            });
                    });
					
            });
            </script>
            
            <?php
            }//if not fullscreen gallery
            ?>
            
             <?php if($background_image != ""){ ?>
                                                                       
             <?php }else{ ?>
                <div id="navigation" class="background_2">
                    <a href="#" id="prevslide"></a>
                    <a href="#" id="pauseplay" class=""></a>
                    <a href="#" id="nextslide"></a>
                </div><!-- /navigation -->
            <?php } ?>
            
            <!-- Audio Player ---------------------------- -->
			<div id="jquery_jplayer_1"></div>
            <div id="jp_interface_1" class="background_2">
             <a href="#" class="jp-play">Play</a>
             <a href="#" class="jp-pause">Pause</a>
            </div>
            <!-- Audio Player ---------------------------- -->
  • This reply was modified 4 years, 8 months ago by  RK Creative.
Posted: Wednesday Apr 18th, 2012 at 1:46 pm #11133

In your

functions.php

change

//Add Menu Manager---------------------------
	add_theme_support( 'nav-menus' );
	add_action( 'init', 'register_my_menus' );
	function register_my_menus() {
	register_nav_menus(
	array(
	'menu-1' => __( 'Navigation Menu' )
		)
					);
	}
//End Menu Manager---------------------------

to

//Add Menu Manager---------------------------
register_nav_menu( 'logged-in-menu', __( 'logged-in-menu') );
register_nav_menu( 'logged-out-menu', __( 'logged-out-menu') );
//End Menu Manager---------------------------

and in

header.php

change

<nav id="nav" class="jqueryslidemenu">            	
							<?php            
                                    wp_nav_menu( array( 
                                                               
                                        'theme_location'  => 'menu-1',
                                        'container'       => false
                                              
                                    )); 
                            ?>
                            <div class="clear"></div>
             </nav>

to

<nav id="nav" class="jqueryslidemenu">            	
							<?php
if ( is_user_logged_in() ) {
    wp_nav_menu( array( 'theme_location' => 'logged-in-menu' ,
                                        'container'       => false) );
} else {
    wp_nav_menu( array( 'theme_location' => 'logged-out-menu' ,
                                        'container'       => false) );
}
?>
                            <div class="clear"></div>
             </nav>

Then in wordpress
admin appearance > menus
, you should see that under theme locations you have support for two or more menus. Now you can create a menu for logged in users and one for users that are not and apply them to the relevant drop down menus under theme locations.

Posted: Wednesday Apr 18th, 2012 at 4:07 pm #11151

Thanks very much Philly, your support is incredible! Worked perfectly…

I have been trying to figure this out since my trysts with WP-Member plugin. s2 works so much better and this solution really should be added to s2 docu. Everyone will need this.

Then in wordpress
admin appearance > menus
, you should see that under theme locations you have support for two or more menus. Now you can create a menu for logged in users and one for users that are not and apply them to the relevant drop down menus under theme locations.

In case anyone else is following this thread, use wp menus to create 2 menus named :
“logged-in-menu” and
“logged-out-menu”

Go to “logged-out-menu” and add your s2 registration page to that menu.
Go to “”logged-in-menu”” and add your s2 profile page to that menu.

Posted: Thursday Apr 19th, 2012 at 9:14 am #11238

Philly,

Do you have instructions on how to properly code a menu logout link under the logged-in-menu above ?

Thanks

Posted: Thursday Apr 19th, 2012 at 12:22 pm #11264

I’m not sure what they use perhaps its

<?php wp_logout(); ?> 

or Logout and Redirect to Current Page

<a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="Logout">Logout</a>
Posted: Wednesday May 2nd, 2012 at 7:52 am #12363
webierweb
Username: joec

How can I add a menu across the top of my site that functions exactly the same as the menu at s2member.com.

Login dropdown….my account shows up when logged in???

I also want to see if I can add a login form to my menu (replace articles)…www.omnimedfinancial.com…is this possible? Thanks.

Posted: Thursday May 3rd, 2012 at 1:05 am #12420
Raam Dev
Username: Raam
Staff Member

Hi Joe,

That login menu is part of the WordPress theme being used. It’s custom coded with JavaScript and CSS.

s2Member Pro comes with the Pro Login Widget (see Appearance -> Widgets -> Pro Login Widget), but if you want something customized for your site you’ll need to code that manually.

Viewing 14 replies - 1 through 14 (of 14 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.