Portfolio events

Hi there I have a problem with my single portfolio navigations.
If a page is selected with items of the same category and I use the arrows provided by ethos for navigating single portfolio items, at the end of that category it doesn’t stop, it jumps to an item of a different category.

Example is a portfolio page with dogs then i select one dog and navigate right at the end of my dogs in doesn’t stop but continues to cats when I didn’t select the page that has cats.
please help
I have provided a link bellow and attached screenshorts to explain further my problem hope that makes sense.
http://www.butlerscocktails.co.za/wordpress/events/elderflower/

Hi There,

Please try adding the following code under functions.php file locates in your child theme:

  function x_entry_navigation() {

  $stack = x_get_stack();

  if ( $stack == 'ethos' ) {
    $left_icon  = '<i class="x-icon-chevron-left" data-x-icon="&#xf053;"></i>';
    $right_icon = '<i class="x-icon-chevron-right" data-x-icon="&#xf054;"></i>';
  } else {
    $left_icon  = '<i class="x-icon-arrow-left" data-x-icon="&#xf060;"></i>';
    $right_icon = '<i class="x-icon-arrow-right" data-x-icon="&#xf061;"></i>';
  }

  $is_ltr    = ! is_rtl();
  $prev_post = get_adjacent_post( true, '', false );
  $next_post = get_adjacent_post( true, '', true );
  $prev_icon = ( $is_ltr ) ? $left_icon : $right_icon;
  $next_icon = ( $is_ltr ) ? $right_icon : $left_icon;

  ?>

  <div class="x-nav-articles">

    <?php if ( $prev_post ) : ?>
      <a href="<?php echo get_permalink( $prev_post ); ?>" title="<?php __( 'Previous Post', '__x__' ); ?>" class="prev">
        <?php echo $prev_icon; ?>
      </a>
    <?php endif; ?>

    <?php if ( $next_post ) : ?>
      <a href="<?php echo get_permalink( $next_post ); ?>" title="<?php __( 'Next Post', '__x__' ); ?>" class="next">
        <?php echo $next_icon; ?>
      </a>
    <?php endif; ?>

  </div>

  <?php

  }

Hope it helps :slight_smile:

Thai
I have followed you instructions as provided, but now my navigations are completely gone I cant navigate at all.
I still need to be able to navigate but navigation must stop at the end of each category.
please see url attached bellow.
http://www.butlerscocktails.co.za/wordpress/events/mojito-strawberry/

Sorry for the confusion. The Entry Navigation does not have that feature out of the box. You will need to modify the behavior but this would require custom development which is outside the scope of our support. Please see https://codex.wordpress.org/Next_and_Previous_Links if you want to learn about the function.

We do have an in-house custom development team that offer paid services, who may be able to assist. They can be contacted at [email protected] if this is of interest to you.

Thank you for your understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.