[wp-trac] [WordPress Trac] #40562: get_permalink($id) and get_permalink($id) get_post_permalink ($id) Return current page Url, not Url of requested ID
WordPress Trac
noreply at wordpress.org
Fri Apr 28 13:36:14 UTC 2017
#40562: get_permalink($id) and get_permalink($id) get_post_permalink ($id) Return
current page Url, not Url of requested ID
--------------------------+------------------------------
Reporter: thefraj | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.7.4
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
--------------------------+------------------------------
Comment (by subrataemfluence):
@thefraj I could not reproduce the issue. Tried by adding your snippet
with my own custom Post ID
{{{
<a href="<?php echo get_post_permalink(717); ?>">the link</a>
}}}
and
{{{
<a href="<?php echo get_permalink(717); ?>">the link</a>
}}}
in a detail page of another custom post type (single-hotel.php).
In both occasions correct permalink for post ID 717 were generated.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40562#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list