get the url from href in php wordpress code example Example: get wordpress page link by id echo get_page_link($page_id);