wordpress get the link from id code example
Example 1: wordpress get link to post by id
get_permalink();
Example 2: wordpress get link
<a href="<?php the_permalink(); ?>">
get_permalink();
<a href="<?php the_permalink(); ?>">