Are you using $post->guid or something like that? If so, then the GUID give you this kind of URL. Otherwise you can use get_the_permalink( $post_id )
Are you using $post->guid or something like that? If so, then the GUID give you this kind of URL. Otherwise you can use get_the_permalink( $post_id )