簡單使用 get parmalink

碼

echo get_permalink();

輸出

當前頁面的連結,例如: http : //website.com/category/name-of-post/