[PR] Use get_the_permalink() to grab current page's URL

This will provide a more consistent result.