-
AuthorPosts
-
January 12, 2015 at 10:46 pm #181678
Hi,
Sorry for the confusion there, please disregard the post above.
You can add this in your child theme’s functions.php file instead.
function x_entry_navigation() { $stack = x_get_stack(); if ( $stack == 'ethos' ) { $left_icon = '<i class="x-icon-chevron-left"></i>'; $right_icon = '<i class="x-icon-chevron-right"></i>'; } else { $left_icon = '<i class="x-icon-arrow-left"></i>'; $right_icon = '<i class="x-icon-arrow-right"></i>'; } $is_ltr = ! is_rtl(); $by_tax = x_is_portfolio_item() ? true : false; $prev_post = get_adjacent_post( $by_tax, '', false ); $next_post = get_adjacent_post( $by_tax, '', 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 that helps.
January 13, 2015 at 5:18 pm #182347OK. Almost but still problems! Different issues listed below.
I don’t care which is fixed – the Category page or Portfolio page. Whichever is fixed, I will reconfigure to suit. My artwork is in different series and I need to display them as such. I need the viewer to be able to click on a series, then click on an image and scroll (via arrows) back & forth between the images. So far, after clicking thru 3 or 4 images, the arrows start linking outside the category.1– Almost works on a Category page. For instance, on the Isotope category page (http://carterhodgkin.com/category/isotopes/) after the 4th image, the arrow links to an artwork not in the Isotope category. It needs to link to the next Isotope image, not a “Burst” category image.
Also the breadcrumb is gone.
2 On the Isotope Portfolio page gallery (http://carterhodgkin.com/isotope-page-gallery/), when an image is clicked, the arrows are gone so no ability to scroll back & forth between images.
Hope this can be solved!
Thanking you in advance!January 14, 2015 at 8:57 am #182831Hi Carter,
#1: This is because the provided code works for portfolio items only, if you want to have the similar functionality for your blog posts too, please use the following code instead:
function x_entry_navigation() { $stack = x_get_stack(); if ( $stack == 'ethos' ) { $left_icon = '<i class="x-icon-chevron-left"></i>'; $right_icon = '<i class="x-icon-chevron-right"></i>'; } else { $left_icon = '<i class="x-icon-arrow-left"></i>'; $right_icon = '<i class="x-icon-arrow-right"></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 }
#2: Please check it again after inserting the above code.
Cheers!
-
AuthorPosts