I’m using the Modernize theme’s custom Portfolio type page. In the single-portfolio.php
template, I call next_
and previous_post_link()
, which correctly display links when in_same_category is set to false
, but when set to true
they are blank.
There are other pages in the same category as the page currently being viewed, though some pages may belong to multiple categories.
Did I miss something obvious?
This shows the following link:
<?php
previous_post_link('<div class="single-port-prev-nav"><div class="left-arrow"></div>%link</div>', '%title', false);
next_post_link('<div class="single-port-next-nav">%link<div class="right-arrow"></div></div>', '%title', false);
This does not show the following link:
<?php
previous_post_link('<div class="single-port-prev-nav"><div class="left-arrow"></div>%link</div>', '%title', true);
next_post_link('<div class="single-port-next-nav">%link<div class="right-arrow"></div></div>', '%title', true);
However, after looking a little more, I wonder if multiple category taxonomies might be playing a role in this. I can’t think of another reason for this not to behave as expected correctly than incorrectly configured categories.