Is it possible to get a page's permalink from the slug alone? I'm aware that you can get the page's permalink from the ID using get_page_link()
:
<a href="<?php echo get_page_link(40); ?>">Map</a>
I'm curious if there is any way to do the same with the slug of a page - like this:
<a href="<?php echo get_page_link('map'); ?>">Map</a>
post_name
column in thewp_posts
database table) for a post's title, which is different. It's also different from a post's path (especially noticeable when using hierarchical paths or when two posts of different post types share the same slug).