[wp-trac] [WordPress Trac] #41277: Random post returned by get_permalink when on post type archive
WordPress Trac
noreply at wordpress.org
Sun Jul 9 15:04:10 UTC 2017
#41277: Random post returned by get_permalink when on post type archive
--------------------------+-----------------------------
Reporter: espellcaste | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Permalinks | Version: 4.8
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
get_permalink has an odd behavior when on post type archives.
It fetches a radom article from the taxonomy archive, instead of returning
the link from the archive itself.
Maybe it was supposed to. But if I do this:
<a class="button" href="<?php echo wp_login_url( get_permalink() ); ?>">
When the link is on a category archive, it will redirect the user to a
radom article from that particular category, because the get_permalink is
returning that particular random post.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41277>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list