• Resolved mikara08

    (@mikara08)


    I am using Visual Portfolio on my website to create portfolio galleries. The problem I’m having now is that the next/previous post links don’t stick to the galleries I’ve created. I’ve limited each of my portfolios to a specific category, but the next/previous posts don’t follow category, they go by date created.

    I’ve been trying to deal with this using a content-portfolio.php page. But nothing I do seems to be working to limit them by category. I feel like I must have a mistake here somewhere, and thought maybe the developers of the plugin would be helpful. I am using:

        <?php next_post_link( 
        '<div class="nav-previous">%link</div>', 
        '<span class="meta-nav">' . _x( '←', 'Next post link', 'morphology' ) . '</span> %title', true, array(), 'portfolio'); ?>

    When I use this though, the link disappears all together. In fact, it disappears as soon as I put down “true” but returns if I delete everything after that point and change it to “false.”

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nK

    (@nko)

    Hi.

    Category taxonomy for portfolio items is called ‘portfolio_category’. So, you need to try this code:

    
    <?php
    next_post_link( 
        '<div class="nav-previous">%link</div>', 
        '<span class="meta-nav">' . _x( '←', 'Next post link', 'morphology' ) . '</span> %title',
        true,
        array(),
        'portfolio_category'
    );
    ?>
    

    Regards, nK.

    Thread Starter mikara08

    (@mikara08)

    Thank you thank you thank you! I have put so much time in getting this one thing to work and this instantly fixed it. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Next/Previous Post links in visual portfolio’ is closed to new replies.