Tagged: x
-
AuthorPosts
-
October 11, 2016 at 2:09 pm #1211925
Bill KParticipantJust had a client ask this:
“Is there an easy way to have nav at the bottom of an individual blog post that allows you to select the next post? It’s just a dead-end when you click into a post otherwise.”
Thoughts?
October 11, 2016 at 5:26 pm #1212119
JadeModeratorHi Bill,
Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.
October 11, 2016 at 5:27 pm #1212120
Bill KParticipantLOL, I thought it was pretty obvious.
Just how to add Next/Previous buttons to bottom of posts.
thx
October 12, 2016 at 1:13 am #1212548
Paul RModeratorHi Bill,
To achieve that you can add this in your child theme’s functions.php file.
function add_post_nav(){ if ( is_singular('post') ){ x_entry_navigation(); } } add_action('x_after_view_global__content', 'add_post_nav'); function x_entry_navigation() { $stack = x_get_stack(); if ( $stack == 'ethos' ) { $left_icon = '<i class="x-icon-chevron-left" data-x-icon=""></i>'; $right_icon = '<i class="x-icon-chevron-right" data-x-icon=""></i>'; } else { $left_icon = '<i class="x-icon-arrow-left" data-x-icon=""></i>'; $right_icon = '<i class="x-icon-arrow-right" data-x-icon=""></i>'; } $is_ltr = ! is_rtl(); $prev_post = get_adjacent_post( false, '', false ); $next_post = get_adjacent_post( false, '', 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"; ?> </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"; ?> </a> <?php endif; ?> </div> <?php }Hope that helps.
October 12, 2016 at 11:01 am #1213112
Bill KParticipantThank you.
I submit this as a feature request– should be an option in the Blog section of the Customizer.
October 12, 2016 at 11:56 am #1213209
RahulModeratorHey There,
We certainly appreciate the feedback! All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1211925 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
