February 15, 2013 at 10:58 am #20384
Thanks for a great theme! I wonder if I can change so that the “next” and “previous” link at the bottom of the portfolio single page only cycles though certain portfolio categories?
For example, we’re planning of using portfolios both for our projects and for the co-worker page. And now when I click on the first co-worker, the previous link is a project. We would like to divide those categories.February 15, 2013 at 11:05 pm #107440
Are you usuing portfolio item categories? Because if you sort a list of portfolio items, and click on one, than only the portfolio items in that specific sort will be displayed when clicking the next button.
NickFebruary 18, 2013 at 7:15 am #107441
Yes Im using the item categories. But Im not using the ajax version, so the portfolio items open up in a new page. It seems to be working correctly with ajax. Im prefering the single page view though, should it be working on that as well?February 18, 2013 at 5:00 pm #107442
In the single-portfolio.php file, remove the
and replace it to the raw output for that function (with the same category limitation):
<div class='post_nav_container stretch_full'>
<?php previous_post_link('<span class="previous_post_link">← %link </span><span class="post_link_text">'.__('(previous entry)','true','avia_framework'))."</span>"; ?>
<?php next_post_link('<span class="next_post_link"><span class="post_link_text">'.__('(next entry)','true','avia_framework').'</span> %link →</span>'); ?>
</div> <!-- end navigation -->
DevinFebruary 20, 2013 at 8:25 am #107443
I still can’t get it to work.
I created a temporary login so you can see for yourself and maybe see whats wrong:
You’ll see a previous link to a diffrent category in the bottom. We have two portfolio pages: “VÅRA PROJEKT” and “MEDARBETARE” under “OM AG ARKITEKTER”. The MEDARBETARE page only shows category items from the category “Medarbetare”, and VÅRA PROJEKT shows all other item categories. Im not using any parenting in the item categories.
TomasFebruary 20, 2013 at 3:34 pm #107444
It is unfortunately not that simple to accomplish, due to a long time WordPress issue http://core.trac.wordpress.org/ticket/17807 … The issue is discussed here http://wordpress.stackexchange.com/questions/42234/thumbnails-on-next-previous-links-in-custom-post-type-single-php?rq=1
This syntax doesn’t seem to work on taxonomies other than category where 13,14,15 would be category id’s to exclude.
<?php next_post_link('%link', 'Next post in category', FALSE, '13 and 14 and 15'); ?>
However there is a plugin that claims to bypass this issue http://wordpress.org/extend/plugins/previous-and-next-post-in-same-taxonomy/
Please hang on.
The topic ‘Portfolio next entry’ is closed to new replies.