[wp-trac] [WordPress Trac] #9963: get_permalink() returns wrong link after The Loop

WordPress Trac wp-trac at lists.automattic.com
Thu May 28 19:02:07 GMT 2009


#9963: get_permalink() returns wrong link after The Loop
--------------------------+-------------------------------------------------
 Reporter:  fmorel90      |       Owner:  ryan
     Type:  defect (bug)  |      Status:  new 
 Priority:  high          |   Milestone:      
Component:  Permalinks    |     Version:  2.8 
 Severity:  major         |    Keywords:      
--------------------------+-------------------------------------------------
 I'm using wp_logout_url(get_permalink()) in a sidebar widget to let users
 logout and return to the current page.
 When viewing a single post, get_permalink() returns the posts' correct
 link.

 However, on my home page, on archive pages, and on search results pages,
 get_permalink() returns the link of the last post in The Loop used to
 display posts in the page. I've checked both my theme and the default
 theme to see if I'd screwed up The Loop, but the default theme does this
 as well.

 I am unsure if it worked correctly in 2.7. It's been a few months since I
 played with WordPress and I just started again with 2.8 a few days ago.
 However, I'm sure I would have noticed this before, so I'm putting this as
 a bug in 2.8.

 If I take out The Loop on my homepage, it returns the link to my latest
 post.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9963>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list