I’m running a multi-vendor WP site where users can create a business profile. The profile is a custom post type (wyz-business).
I’m looking to get the URL of logged in user’s profile (custom post type).
Looking at the developer’s code, they seem to get the URL of logged in user’s business with
<?php echo get_the_permalink( $curr_id );?>
What I’m trying to achieve is to create an embed link that users can put on their websites. Below is my code from functions.php and then I embed the shortcode on user’s dashboard – BUT it’s returning the URL of the dashboard and not user’s profile:
<a href=”<?php echo get_the_permalink( $curr_id );?>”>Visit My Profile</a>
What am I doing wrong?
Read more here:: Get URL of logged in user’s custom post (WordPress)