[wp-trac] [WordPress Trac] #17807: get_adjacent_post() doesn't work with custom taxonomies

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 5 01:49:14 UTC 2011


#17807: get_adjacent_post() doesn't work with custom taxonomies
-------------------------------------+------------------------------
 Reporter:  avaly                    |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Taxonomy                 |     Version:  3.1.3
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------------------
Changes (by billerickson):

 * keywords:   => has-patch needs-testing


Comment:

 This patch let's you use the taxonomy slug as the value of $in_same_cat
 instead of just true. If your value for $in_same_cat is a taxonomy, it
 will use that taxonomy; else it uses 'category' (so setting $in_same_cat
 to true still works).

 So to use the taxonomy 'type', use:

 previous_post_link( '%link', '← Previous', 'type' );

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


More information about the wp-trac mailing list