WordPress.org

Ready to get started?Download WordPress

Forums

Get the permalink having the id (2 posts)

  1. Marcomail
    Member
    Posted 3 years ago #

    Hi. how can i get the permalink if i have the id ? This doesn't work

    <?php $id = $post->ID; ?>
    <a href="<?php get_post_permalink ( '$id' , $leavename = false, $sample = false ) ?>

    ? Thanks

  2. Jonathan Dingman
    Member
    Posted 3 years ago #

    You want to be using get_permalink() instead.

    http://codex.wordpress.org/Function_Reference/get_permalink

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.