WordPress.org

Ready to get started?Download WordPress

Forums

How can I get the permalink for the current page? (1 post)

  1. shaojz2005
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags