[wp-trac] [WordPress Trac] #27564: previous_post_link() and next_post_link() returns nothing

WordPress Trac noreply at wordpress.org
Sat Mar 29 03:57:42 UTC 2014


#27564: previous_post_link() and next_post_link() returns nothing
--------------------------+-----------------------
 Reporter:  genkisan      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.9
Component:  Themes        |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  template
--------------------------+-----------------------

Comment (by nacin):

 You need to check $query->is_main_query() before doing pre_get_posts
 manipulations.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27564#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list