Shortcode for login status – UserPro Forums https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/feed/ Sun, 19 May 2024 20:32:24 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/#post-27709 <![CDATA[Shortcode for login status]]> https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/#post-27709 Fri, 14 Mar 2014 07:50:35 +0000 test Dear All

What i want to achieve is to display the login status of a user, in the header of my website using php echo code here is the code am using to achieve this:

When a user has not yet login the following text appear: “Login | Register” and when a user login “Welcome admin! | Logout”.

My problem is that the Login Register and Logout appear just as text! With no link to go to login or register page or to logout the user using this shortcode.

Anyone can help to fix this please?

]]>
https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/#post-27719 <![CDATA[Reply To: Shortcode for login status]]> https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/#post-27719 Fri, 14 Mar 2014 08:43:18 +0000 Kale Peel +1 for this!

]]>
https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/#post-27770 <![CDATA[Reply To: Shortcode for login status]]> https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/#post-27770 Fri, 14 Mar 2014 13:47:17 +0000 test Hello

I dont know why the code i posted before is messed up here’s the code again:

——————————————————————————————————–

<div class=”container”>
<p>
<span><?php echo $tmq_phone_contact_before;?><?php echo $tmq_phone_contact; ?><?php echo $tmq_phone_contact_after;?></span>
<span><?php echo $tmq_email_contact_before;?><?php echo $tmq_email_contact; ?><?php echo $tmq_email_contact_after;?></span>
<span><i class=”fa fa-lock”></i><?php echo do_shortcode(‘[userpro_loggedout]Login | Register[/userpro_loggedout]’); ?></span>
<span><i class=”fa fa-unlock-alt”></i><?php echo do_shortcode(‘[userpro_loggedin]Welcome, [username]! | Logout[/userpro_loggedin]’); ?></span>
</p>

——————————————————————————————————–

]]>
https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/#post-27780 <![CDATA[Reply To: Shortcode for login status]]> https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/#post-27780 Fri, 14 Mar 2014 14:44:53 +0000 Tomas Samot Just look at your code and tell me -where do you put ANY links to login or logout? you just using shrocode for displaying text to user if he is logged inor loged out, in your code there is no any code to display/create urls.

so instead of just

<?php echo do_shortcode('[userpro_loggedout]Login | Register[/userpro_loggedout]'); ?>

do something like

<?php echo do_shortcode('[userpro_loggedout]<a href="/login">Login</a> | <a href="/register">Register</a>[/userpro_loggedout]'); ?>

this is so obvious man 🙂

]]>
https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/#post-27782 <![CDATA[Reply To: Shortcode for login status]]> https://forum.userproplugin.com/forums/topic/shortcode-for-login-status/#post-27782 Fri, 14 Mar 2014 14:52:54 +0000 test The shortcode given in the documentation didn’t have the link, thats why having problem. thanks a lot.
But what link to use for the LOGOUT?

]]>