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.

Login Form: S2Member-style Top Bar

Home Forums Community Forum Login Form: S2Member-style Top Bar

This topic contains 3 replies, has 2 voices. Last updated by  Jason (Lead Developer) 3 years, 11 months ago.

Topic Author Topic
Posted: Saturday Jan 19th, 2013 at 10:22 am #38308

Hello:
I did what Christian mentioned in post #24351 back in 9/2012 to create the login bar like S2Member but nothing shows up. There’s a mention of modifying the CSS in the InFocus Theme but no details. I modified the header.php file per the instructions.

Can you provide some detail as to how to get this working?

Thanks!

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Sunday Jan 20th, 2013 at 4:24 pm #38476
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

Can you please link me to the post you’re referring to?

Also, please see this KB article for some clarification.
Knowledge Base » Login Box Like s2Member.com?
Posted: Sunday Jan 20th, 2013 at 6:28 pm #38505

Sorry Jason. The link is: http://www.s2member.com/forums/topic/login-form-2/

I use the Infocus 3.0 theme (which I think you guys do too). I made the changes to header.php that was recommended in the above thread but didn’t get the result I was expecting…actually I got nothing.

For my site, I need a similar capability as S2Members site with the bar at the top for the purposes of login/logout, member account, and profile. When a visitor is at the site, I either want to hide the bar entirely or all options except login.

Thanks :)

Posted: Sunday Jan 20th, 2013 at 9:38 pm #38555
Staff Member

Thanks for the follow-up :-)

I’ll try to get you started on this with the inFocus theme. That’s about as far as I can go on custom coding. I’ll be happy to provide you with more leads on where to find certain things, or to share ideas with you, but I can’t debug any custom code that you end up with; due to time constraints :-) Please see: s2Member® » Support Policy » Within Scope for some clarification on this. Thanks!

Step #1.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

<?php
add_action('mysite_before_header', 'my_login_box');
function my_login_box()
	{
		if(!is_user_logged_in())
			{
				echo '<div id="my-login-box">';
				$ops = array('title' => '', 'login_redirect' => '%%previous%%', 'my_profile_url' => site_url('/profile/'), 'logout_redirect' => '');
				echo s2member_pro_login_widget($ops);
				echo '</div>';
			}
	}

Step #2. Now apply CSS styles like this.

See also. This article in the s2Member® Codex.
s2Member® Pro Login Widget Via PHP
Viewing 3 replies - 1 through 3 (of 3 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.