i am working on a wordpress website, and i am little stuck into one sitautation,
i want to store the last part of url in $variable. here below is my URL
https://jobifyinc.com/newsite/my-profile/#tab2
i want to store #tab2 in $variable
i tried the following code but it only returns me the my-profile as a last part
global $post;
$post_slug = $post->post_name;
anyother best and alternative option?