[wp-trac] [WordPress Trac] #15883: when using get_posts() post_date does not get localized

WordPress Trac wp-trac at lists.automattic.com
Sun Dec 19 07:51:51 UTC 2010


#15883: when using get_posts() post_date does not get localized
--------------------------+----------------------
 Reporter:  bmb           |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:  3.0.3
 Severity:  minor         |  Resolution:  invalid
 Keywords:                |
--------------------------+----------------------

Comment (by dd32):

 > when using get_posts, I can't use get_the_date, since it doesn't set the
 global $post, but I had understood that this was the correct simple method
 for getting posts, not using WP_query and loops.

 get_posts() actually makes an instance of WP_Query.

 For an example of how to use a custom loop, See
 http://codex.wordpress.org/Function_Reference/WP_Query#Fixing_errors_with_broken_queries

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15883#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list