How can I get the permalink for the current page?
Not only the current page or post,it may be any type:category,tag,artchive...I know function get_permalink() can get the permalink for the post or page,but I also want to get the category,tag or artchive's permalink automaticaly.
Because I used the default permalink(such as ?p=xxx) before,and now I change to advanced permalink(such as /%postname%/).However,the Google is still embody my links in the old style,so I want to use 301 redirect in the header.php to change the url when people click into the page using old permalink links.
Forgive me for my poor English :)
Thanks for help.