Hi i created a link ( MY PROFILE ) to the header bar that links to the logged in user public profile (file: user-public-profile.php). The link works fine on all pages but not when i visit other users pubic profile pages.
Let me explain more:
There are for example 2 users registered on the site. John and Anna. I as John am Logged in to the site and click the link (MY PROFILE). It works fine and point to my public profile page. BUT when i visit Anna's public profile then the link (MY PROFILE) points now to Anna's public profile page and vice versa, when i log in as Anna and visit John's public profile then for only this specific page the link stop to work as it should and point again to John's public profile page !!!!. The link (MY PROFILE) should be always point to MY profile page no matter what page i visit.
This is the code i use to get the loggedin user public page URL:
<a href="<?php echo osc_user_public_profile_url($id = null); ?>">MY PUBLIC PROFILE</a>
i also tried
<a href="<?php echo osc_user_public_profile_url(); ?>">MY PUBLIC PROFILE</a>
but no luck.
It work fine on every page except when i visit other users public profile pages!! What i m doing wrong?
Could you please help me ??