Dear Marc,
please insert the following code into your child theme’s “functions.php”:
function happenstance_child_prev_next($nav_id) { ?>
<?php $happenstance_previous_post = get_adjacent_post( false, "", true );
$happenstance_next_post = get_adjacent_post( false, "", false ); ?>
<div id="<?php echo $nav_id; ?>" class="navigation" role="navigation">
<div class="nav-wrapper">
<?php if ( !empty($happenstance_previous_post) ) { ?>
<p class="nav-previous"><a href="<?php echo esc_url(get_permalink($happenstance_previous_post->ID)); ?>" title="<?php echo esc_attr($happenstance_previous_post->post_title); ?>"><?php _e( '← Previous post', 'happenstance' ); ?></a></p>
<?php } if ( !empty($happenstance_next_post) ) { ?>
<p class="nav-next"><a href="<?php echo esc_url(get_permalink($happenstance_next_post->ID)); ?>" title="<?php echo esc_attr($happenstance_next_post->post_title); ?>"><?php _e( 'Next post →', 'happenstance' ); ?></a></p>
<?php } ?>
</div>
</div>
<?php }
and edit the text strings <?php _e( '← Previous post', 'happenstance' ); ?>
and <?php _e( 'Next post →', 'happenstance' ); ?>
according to your needs.
Then edit the following code in your child theme’s “single.php”:
<?php happenstance_prev_next('happenstance-post-nav'); ?>
in this way:
<?php happenstance_child_prev_next('happenstance-post-nav'); ?>
Note: This support forum should be used only for questions related to the Free version of the HappenStance theme. Because the above described solution would work also in the Free version, I responded it here, but for another questions related to the Premium version please use the support forum on my website. Thank you!
Best regards,
Tomas Toman