Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › Community Links – Login At Top Of Theme
- This topic has 11 replies, 3 voices, and was last updated 11 years, 11 months ago by admin.
-
AuthorPosts
-
December 13, 2012 at 6:43 pm #8155jelboy7413Spectator
I have a issue whereby the login at the top of my site, (Which runs through the theme) goes to the wordpress register/login system rather than the eMember one which is what I’d need.
Here’s the code.
“
<!–Begin Login Box–>
<?php if($theme_login_link == “1”) { } else { ?>
<div id=”login-box” class=”login-box-hidden”>
<?php wp_login_form(array(‘redirect’ => “http://”.$_SERVER . $_SERVER)); ?>/wp-login.php?action=lostpassword”>Forgot your password?
</div>
<?php } ?>
<!–End Login Box–>
<!–Begin Register Box–>
<div id=”register-box” class=”login-box-hidden”>
<?php global $user_ID, $user_identity, $user_level ?>
<form id=”registerform” action=”<?php echo site_url(‘wp-login.php?action=register’, ‘login_post’) ?>” method=”post”>
<p class=”login-username”><label>Username</label>
<input type=”text” name=”user_login” id=”user_register” class=”input” value=”<?php echo esc_attr(stripslashes($user_login)); ?>” size=”22″ /></p>
<p class=”login-email”><label>Email</label>
<input type=”text” name=”user_email” id=”user_email” class=”input” value=”<?php echo esc_attr(stripslashes($user_email)); ?>” size=”22″ /></p>
<?php do_action(‘register_form’); ?>
<p>A password will be emailed to you.</p>
<p><input type=”submit” name=”wp-submit” id=”wp-register” value=”<?php esc_attr_e(‘Register’); ?>” tabindex=”100″ /></p>
</form>
</div>
<!–End Register Box–>
“
How’d I fix this?
Please help,
Thanks,
December 13, 2012 at 9:58 pm #52389PeterMemberHi,
Does your theme have a setting to remove its login widget? You should ask your theme developer about this.
Regarding the eMember login – you can easily display a “compact login” widget virtually anywhere in your theme as explained in this post:
http://www.tipsandtricks-hq.com/wordpress-membership/using-a-compact-login-and-join-us-message-203
December 13, 2012 at 10:37 pm #52390jelboy7413SpectatorIts not really a widget. It’s just called “community links” and you can choose whether to display it or not. It sites just above the nav bar so my guess it’s something to do with coding. If I provided you with the code would you be able to take a look? Oh yeah and it does have an option to switch it off. Just I quite like where they put it.
December 14, 2012 at 12:17 am #52391adminKeymasterYou can do one of two things:
1) Turn off that option from the theme then use the following to place a login and register link in the header area of your site:
http://www.tipsandtricks-hq.com/wordpress-membership/using-a-compact-login-and-join-us-message-203
or
2) Replace their login and register code (your shared this code in your 1st post above) with the following line (this will show eMember’s compact login message):
<?php echo eMember_compact_login_widget(); ?>
December 14, 2012 at 5:46 pm #52392jelboy7413SpectatorThanks so much for this. Really helpful and quick response. Sorry to ask but could you tell me what I’d need to:
A) Create a tiny bit more a gap between the nav bar and the text IE:
[http://img10.imageshack.us/img10/2990/d839daaaf2d04d74b8d6614.png]
As if you look at it, it’s actually touching the bar. I’d like to rise it the slightest bit so it isn’t.
B)Move it to the right hand side?
Hopefully this is just a small piece of extra code.
Thanks,
Awesome support,
December 14, 2012 at 11:44 pm #52393adminKeymasterYou should be able to wrap that section in a CSS class then style it however you want it. Here is an example with some inline CSS that should help:
<div style="margin:15px;align:right;">
<?php echo eMember_compact_login_widget(); ?>
<div>December 15, 2012 at 9:32 am #52394jelboy7413SpectatorThis hasn’t worked for some reason. Most obviously it hasn’t moved to the right and I haven’t noticed a change when changing the margin by quite a number. Not too sure what’s going on.
December 16, 2012 at 11:01 pm #52395adminKeymasterTry the following:
<div style="margin:20px;text-align:right;">
<?php echo eMember_compact_login_widget(); ?>
<div>December 17, 2012 at 7:24 pm #52396jelboy7413SpectatorThanks, got it working. Can you tell me if I can edit the text that the compact login displays? I’d like to mention the fact it’s free to register on my site.
December 17, 2012 at 11:04 pm #52397PeterMemberTo modify text displayed by the plugins please see this post:
December 20, 2012 at 7:49 pm #52398jelboy7413SpectatorThanks,
Instead of a new thread thought’d I’d just ask here. Have been following the steps to change nav bars for when visitors visit and users login. Changed code but the nav bar cut off slightly. Asked the theme dev’s for help and they said:
3) Make sure you add the same styling to the wp_nav_menu tag as the one already in header.php. e.g.
<?php wp_nav_menu(array(‘menu’ => ‘normal-visitor-menu’, ‘container’ => ‘ul’)); ?>
Could you help me out with a little more info or the correct code to fix this so it works smoothly?
December 21, 2012 at 11:59 pm #52399adminKeymasterThe emember plugin has nothing to do with the styling of your navigation bar. This is not something we can help you with unfortunately. As fars as I can see, you are making the call correctly. However, this theme may not be using “ul” as a container for the nav bar. Only your theme developer will know what CSS class they are using as the container for the nav bar (if they are using WP3.0 menu)
-
AuthorPosts
- You must be logged in to reply to this topic.