New Landing How can we help? Themeforest Theme Support Pinpoint Limit categories on "next" and "previous" portfolio navigation?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Pinpoint
  • #6634
    designpoint
    Member
    Post count: 12

    I’d like the ability to limit the categories that the “next” and “previous” portfolio navigation returns results from. We have several different types of projects on a website we’re developing, and I’d really like for the navigation to only pull the portfolios from a particular category. Is that a possibility?

    To clarify, if we have a portfolio category of “retail”, I’d like the links at the bottom of the site that link you to the next and previous portfolio items to only link to the other portfolio items in that category. Is this something you could help us with? Thanks.

    http://designpointdev.com/RDCWP/?portfolio=edgewater-crossing

    #6690
    Cosmin – SUPPORT
    Member
    Post count: 3851

    Hi,

    WordPress only has the ability to specify if the next/prev posts linked should be from the same category, please read here: http://codex.wordpress.org/Function_Reference/next_post_link

    You can implement the above in single-portfolio.php, at lines 177 and 178.

    Regards,
    ————————————————————————————————————

    Cosmin
    Support Assistant

    #6729
    designpoint
    Member
    Post count: 12

    OK, so I added TRUE to the lines on 177 and 178 but instead of limiting the categories, it eliminated the links entirely. Here’s one of the lines, so you can tell me if I did this correctly or if I screwed it up.

    <div class="nav-previous"><?php next_post_link(__('<i class="icon-chevron-left"></i> <span class="nav-text">%link</span>', 'swiftframework'), '%title', TRUE); ?></div>
    #6918
    Cosmin – SUPPORT
    Member
    Post count: 3851

    If you have no other posts in the category that post is from, it won’t show any next/prev links, as this limits navigation to posts within the same category.

    Regards,
    ————————————————————————————————————

    Cosmin
    Support Assistant

    #6935
    designpoint
    Member
    Post count: 12

    Understood, however I’ve made sure that there were multiple posts. Was there anything wrong with the code I pasted?

    The only other issue I could think of is that many of my portfolio items belong to multiple categories. Would that break it?

    http://designpointdev.com/RDCWP/portfolio/the-recommendation/

    #7242
    Cosmin – SUPPORT
    Member
    Post count: 3851

    The code looks fine to me; Ed, is there something else that might prevent it from working correctly?

    Regards,

    ————————————————————————————————————

    Cosmin
    Support Assistant

    #7279
    designpoint
    Member
    Post count: 12

    Cosmin –

    The only thing I can think of is having the portfolio items in more than one category.

    #7323
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi there,

    This is actually an issue with WordPress, which is fixed by this plugin and it’s functions – http://wordpress.org/plugins/previous-and-next-post-in-same-taxonomy/

    Hope that helps.

    – Ed

    #7388
    designpoint
    Member
    Post count: 12

    Hi Ed, I have installed and activated the plugin, and no changes. This particular video is only in one category which has several items. Still can’t understand why the code isn’t working, Any thoughts?


    <div class="pagination-wrap portfolio-pagination full-width clearfix">
    <div class="nav-previous"><?php next_post_link(__('<i class="icon-chevron-left"></i> <span class="nav-text">%link</span>', 'swiftframework'), '%title', TRUE); ?></div>
    <div class="nav-next"><?php previous_post_link(__('<span class="nav-text">%link</span><i class="icon-chevron-right"></i>', 'swiftframework'), '%title', TRUE); ?></div>
    </div>

    #7411
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Try changing the functions to:

    be_previous_post_link()
    be_next_post_link()

    As per the new plugin.

    – Ed

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register