I asked a very similar question earlier today (http://wordpress.stackexchange.com/questions/30392/how-to-get-the-original-post-id-of-a-static-home-page) and thought I had the answer, but now it appears otherwise.
If I have a post/page with the original permalink of http://mydomain.com/blog/my-post/
for example, and I set that as the static home page of the blog, I am unable to get the original permalink of that page when I visit it, since WP only returns the root (site_url()
essentially) permalink and redirects me there, since it is now set as the home page.
How can I retrieve the ORIGINAL permalink? get_option('page_on_front')
doesn't work because it will just return the blog root url, such as http://mydomain.com/blog/
. I need to fetch the full original unaltered permalink of the currently-set static home page.
Hope that's clear... thanks all!