Thursday, December 24, 2015

Wordpress get permalink of post from ID

Permalink of a page or post using ID can be retrieved as follows:

$url = get_permalink($post_id);

Where $post_id  is the ID of the post or page whose permalink is to be get.

No comments:

Post a Comment

MS SQL : How to identify fragmentation in your indexes?

Almost all of us know what fragmentation in SQL indexes are and how it can affect the performance. For those who are new Index fragmentation...