Retrieve default permalink while using seo friendly URLs in WordPress July 22, 2022 by Tarik Billa Use one of the_shortlink (complete link) or wp_get_shortlink() (bare link) both introduced in WordPress 3.0.0.