-
Ahmed,
When I use [userpro_loggedout] and [userpro_loggedin] shortcode and view another users profile (while logged in a a registered user) The shortcode is not working. Works correctly on every other page except some elses profile page.Thank you,
Marcel[userpro_loggedout] not working on user profile page? or another user’s profile page?
It seems that this shortcode is a little bit “crazy” 😀
I’ve already reported this issue, in my case the shortcode wasn’t working when I was displaying a profile just after an other profile (and in other particular cases).
So I redesigned the way my site works as a workaround.
The code for this shortcode looks normal tho.
add_shortcode(‘userpro_loggedout’, ‘userpro_loggedout’ );
function userpro_loggedout( $args=array(), $content=null ) {
global $wp, $userpro_admin, $userpro;
ob_start();
if (!userpro_is_logged_in()){
echo do_shortcode( $content );
}
$output = ob_get_contents();
ob_end_clean();
return $output;
}Absolutly, maybe these dysfunctions comes from my theme or a plugin!
This is the userpro_logeddedout shortcode from UserPro. It’s so clean.
if (!userpro_is_logged_in()){
echo do_shortcode( $content );
}This seems to only happen on the profile page of another user. Regardless of it you are logged in or not.
Maybe something with that page?(From the url in my private message) Go to member directory and any select profile. Feature in header based on [userpro_loggedout][userpro_loggedin] does not show at all. Only on this page and the rest are all fine.
Also, please note that the behavior on others profile page seems off. The shortcode to show their posts requires user to be logged in. Some profile items read as if it were my profile. i.e. “(Your employer will not be visible to public)” – is this because I am viewing with an admin account?
Can you try this shortcode?
[userpro_loggedout] ..content for logged out here[/userpro_loggedout] 🙂
Here is how I have the shortcode implemented (works everywhere except other users profile pages):
<div class=”wf-td assistive-info” role=”complementary”>
<?php echo do_shortcode(‘[userpro_loggedout]Create a ProfileLogin[/userpro_loggedout]’); ?>
<?php echo do_shortcode(‘[userpro_loggedin]Welcome, [first_name]! View ProfileLogout[/userpro_loggedin]’); ?>
</div>
You must be logged in to reply to this topic.