This is the method to get URL of current page.Use and enjoy
$link2=$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ;
$link_n2=explode('myvar',$link2);
echo $link_n2[1];
$link2=$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ;
$link_n2=explode('myvar',$link2);
echo $link_n2[1];
Check out the global $wp object, too. It contains some useful information about the current query.
ReplyDeleteYes Sure i will cover It in my future Post...:)
Delete