New Landing How can we help? Themeforest Theme Support Dante Portfolio page – Next and Previous buttons

Viewing 13 posts - 1 through 13 (of 13 total)
  • Posted in: Dante
  • #95843
    metzger_1
    Member
    Post count: 27

    Is there a way to exclude a specific portfolio category from the Previous and Next Buttons on the Portfolio-Single page template?

    We do not want Client coverage to show up as users flip through our portfolio itmes

    #95992
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Unfortunately not sorry. I’ve noticed you have removed the navigation now? That is the only solution

    – Kyle

    #96171
    metzger_1
    Member
    Post count: 27

    I think there is actually a way to adjust the PHP code in the single-portfolio.php to exclude a specific category (since I am not a PHP expert – I reached this) however all the code I have added to the file doex not seem to exclude the one category I am trying hide.

    <ul class=”pagination-wrap bar-styling portfolio-pagination clearfix”>
    <li class=”prev”><?php next_post_link(‘%link’, ‘<i class=”ss-navigateleft”></i>’); ?>
    <?php if ($portfolio_page) { ?>
    <li class=”index”>“><i class=”ss-layergroup”></i>
    <?php } ?>
    <li class=”next”><?php previous_post_link(‘%link’, ‘<i class=”ss-navigateright”></i>’); ?>

    I know there is a way to exclude a specific category in this piece of code I just haven’t found the right code to do it. I am hoping your PHP experts can tell me the proper way to do it.

    I have only hidden the post navigation temporarily, until I can implement the exclude category code.

    #96176
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    I will forward this to the developer to see if it is possible

    – Kyle

    #96190
    audiophreak
    Member
    Post count: 25

    I was actually trying to solve a similar problem but came across this that should help you. It has an example for excluding the category.

    http://codex.wordpress.org/Function_Reference/next_post_link

    #96213
    metzger_1
    Member
    Post count: 27

    Thanks audiophreak, but I tried both both the
    $excluded_terms = ‘293’, and the
    TRUE, ‘293’,

    In the PHP code above. But neither of them seemed to work. Here is how I had the code listed

    <ul class=”pagination-wrap bar-styling portfolio-pagination clearfix”>
    <li class=”prev”><?php next_post_link(‘%link’, TRUE, ‘293’, ‘<i class=”ss-navigateleft”></i>’); ?>
    <?php if ($portfolio_page) { ?>
    <li class=”index”>“><i class=”ss-layergroup”></i>
    <?php } ?>
    <li class=”next”><?php previous_post_link(‘%link’, TRUE, ‘293’, ‘<i class=”ss-navigateright”></i>’); ?>

    AND

    <ul class=”pagination-wrap bar-styling portfolio-pagination clearfix”>
    <li class=”prev”><?php next_post_link(‘%link’, $excluded_terms = ‘293’, ‘<i class=”ss-navigateleft”></i>’); ?>
    <?php if ($portfolio_page) { ?>
    <li class=”index”>“><i class=”ss-layergroup”></i>
    <?php } ?>
    <li class=”next”><?php previous_post_link(‘%link’, $excluded_terms = ‘293’, ‘<i class=”ss-navigateright”></i>’); ?>

    Do you think I might be missing something else?

    #96273
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    This is the code you want:

    <?php next_post_link('%link', '<i class="ss-navigateleft"></i>', true, '', 'portfolio-category'); ?>
    

    and

    <?php previous_post_link('%link', '<i class="ss-navigateright"></i>', true, '', 'portfolio-category'); ?>

    – Ed

    #96552
    metzger_1
    Member
    Post count: 27

    Sadly that did not work. Any other ideas?

    #96553
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Sorry, misread the question. I haven’t tried it, but this should be correct:

    <?php next_post_link('%link', '<i class="ss-navigateleft"></i>', false, '293', 'portfolio-category'); ?>

    and

    <?php previous_post_link('%link', '<i class="ss-navigateright"></i>', false, '293', 'portfolio-category'); ?>

    – Ed

    #96557
    metzger_1
    Member
    Post count: 27

    nope this didn’t work either.

    #96568
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hmm.. Well that is the code as specified here: http://codex.wordpress.org/Function_Reference/next_post_link

    Nothing in the theme would cause that not to work.

    – Ed

    #96571
    metzger_1
    Member
    Post count: 27

    I know I am confused too.

    #96839
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Sorry that you didn’t make it work 🙁

    -Rui

Viewing 13 posts - 1 through 13 (of 13 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