get_permalink function

get_permalink()

is a function in WordPress through which we can get the link of post or page.

This function is helpful when we are customizing our posts or page.

For Ex. I have called all the post whose category id is 3 on page and want to display a link of detail page of the those post post, so details page link can be display by using get_permalink.

we can also pass parameter in this function like

get_permalink($id)

.

$id is can be the id of page or post.

Leave a Reply