Title: Next/Previous post
Last modified: August 30, 2016

---

# Next/Previous post

 *  Resolved [marcAroma](https://wordpress.org/support/users/marcaroma/)
 * (@marcaroma)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/nextprevious-post-3/)
 * How do I change the next/previous post text (and maybe add the thumbnail of the
   next/previous post…), and possible its location? I created a child theme, but
   got a bit stuck 🙂
 * I am using HappenStance Premium Version: 1.1.3
 * Cheers,
    Marc

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Theme Author [TT Themes](https://wordpress.org/support/users/tomastoman/)
 * (@tomastoman)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/nextprevious-post-3/#post-6387346)
 * 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( '&larr; 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 &rarr;', 'happenstance' ); ?></a></p>
       <?php } ?>
          </div>
       </div>
       <?php }
       ```
   
 * and edit the text strings `<?php _e( '&larr; Previous post', 'happenstance' );?
   >` and `<?php _e( 'Next post &rarr;', '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](http://www.tomastoman.cz/support/)
   on my website. Thank you!
 * Best regards,
    Tomas Toman
 *  Thread Starter [marcAroma](https://wordpress.org/support/users/marcaroma/)
 * (@marcaroma)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/nextprevious-post-3/#post-6387355)
 * Hi Tomas,
 * **Many thanks for that! It works perfectly!**
 * Cheers,
    Marc
 * PS: Sorry, I tried to go to your website, but it was ‘down for maintenance’; 
   why I decided to post here, next time I’ll try to use your website.
 *  Theme Author [TT Themes](https://wordpress.org/support/users/tomastoman/)
 * (@tomastoman)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/nextprevious-post-3/#post-6387357)
 * Hi Marc,
 * yes, I understand. 🙂 Anyway, I am glad that I could help you!
 * Best regards,
    Tomas Toman
 *  Thread Starter [marcAroma](https://wordpress.org/support/users/marcaroma/)
 * (@marcaroma)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/nextprevious-post-3/#post-6387365)
 * Really LOVE your theme(s)!!!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Next/Previous post’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/happenstance/3.0.1/screenshot.
   png)
 * HappenStance
 * [Support Threads](https://wordpress.org/support/theme/happenstance/)
 * [Active Topics](https://wordpress.org/support/theme/happenstance/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/happenstance/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/happenstance/reviews/)

## Tags

 * [change](https://wordpress.org/support/topic-tag/change/)
 * [next previous](https://wordpress.org/support/topic-tag/next-previous/)

 * 4 replies
 * 2 participants
 * Last reply from: [marcAroma](https://wordpress.org/support/users/marcaroma/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/nextprevious-post-3/#post-6387365)
 * Status: resolved