'in_same_tax' => true (not working)
-
I have made a list of rooms with custom post type. The rooms are split into two different groups using custom taxonomy (house and cottage). I would like the previous/next post to loop through only it’s particular taxonomy. I’m able to get the previous/next links to cycle through all of the rooms in my custom post type, it is just not limiting the loop to the particular custom taxonomy. When I add
'in_same_tax' => true
to my array the link goes away (so I’m assuming it is not finding any other posts with the same taxonomy). I don’t know of a way to either see what taxonomy it is comparing to or if it is even seeing my custom taxonomy. (I am only using one custom taxonomy for the rooms custom post type)Any help would be greatly appreciated.
Thanks.
Here is what my code looks like:
<li class="postLink"><?php previous_post_link_plus( array( 'order_by' => 'menu_order', 'loop' => true, 'link' => '? Previous Room', 'before' => '', 'after' => '', 'format' => '%link', 'echo' => true 'in_same_tax' => true ) ); ?></li>
- The topic ‘'in_same_tax' => true (not working)’ is closed to new replies.