[wp-trac] [WordPress Trac] #13943: Sticky posts are sticky posts even if they are trashed

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 17 11:35:42 UTC 2010


#13943: Sticky posts are sticky posts even if they are trashed
--------------------------+-------------------------------------------------
 Reporter:  bi0xid        |       Owner:                                 
     Type:  defect (bug)  |      Status:  new                            
 Priority:  normal        |   Milestone:  3.0                            
Component:  Post Types    |     Version:                                 
 Severity:  normal        |    Keywords:  reporter-feedback, sticky posts
--------------------------+-------------------------------------------------
 Hello there.

 I have some problem with sticky posts.

 I'm using this function to get the last of them:

 {{{
         $sticky = get_option( 'sticky_posts' );
         echo '<strong><a
 href="'.get_permalink($sticky[0]).'">'.get_the_title($sticky[0]).'</a></strong>';
         echo '<a
 href="'.get_permalink($sticky[0]).'">'.get_the_post_thumbnail($sticky[0],
 'thumbnail').'</a>';
 }}}

 I have trashed a sticky post, and this function still echoes the post in
 the trash.

 If I delete it permanently it of course disappears.

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


More information about the wp-trac mailing list