Title: WordPress Next Post Issue
Last modified: August 22, 2016

---

# WordPress Next Post Issue

 *  [needhelpwithnimble](https://wordpress.org/support/users/needhelpwithnimble/)
 * (@needhelpwithnimble)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-next-post-issue/)
 * Hi everyone,
 * My website is an anime directory where we have embed episodes of different shows.
 * On each episode page, there is a link to the next episode, and the previous one.
   as seen below.
 * [http://animewolf.tv/anime/dragon-ball-gt-episode-16-dubbed/](http://animewolf.tv/anime/dragon-ball-gt-episode-16-dubbed/)
 * I want to put an adfly link BEFORE the previous and next episode url, so instead
   of it showing
 * [http://animewolf.tv/anime/dragon-ball-gt-episode-15-dubbed/](http://animewolf.tv/anime/dragon-ball-gt-episode-15-dubbed/)
 * for previous episode it would show
 * [http://adf.ly/527275432/animewolf.tv/anime/dragon-ball-gt-episode-15-dubbed/](http://adf.ly/527275432/animewolf.tv/anime/dragon-ball-gt-episode-15-dubbed/)
 * and episode 17 would show
 * [http://adf.ly/527275432/animewolf.tv/anime/dragon-ball-gt-episode-17-dubbed/](http://adf.ly/527275432/animewolf.tv/anime/dragon-ball-gt-episode-17-dubbed/)
 * Here is the code that displays the players
 *     ```
       <div class="right-side">
   
       	<?php
       				if( $prev_link != NULL )
       					echo $prev_link . "<i title='Last Episode' class='playerleft tooltips fa fa-angle-double-left'> </i></a>";?>
   
       <a class="tooltips" title='View all <?php echo $name; ?> Episodes' href='<?php echo $series_link; ?>'><i class="allepisodes fa fa-sort-amount-asc"></i></a>
       	<?php
       				if( $next_link != NULL )
       					echo $next_link . "<i title='Next Episode'class='playerright tooltips fa fa-angle-double-right'> </i></a>"; ?>
   
       </div> <!-- End of right side -->
       ```
   
 * If anyone could help me, I’ll tip you through paypal because this is driving 
   me nuts xd
 * Thanks!

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

 *  [Ramesh (thecodeisclear)](https://wordpress.org/support/users/thecodeisclear/)
 * (@thecodeisclear)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-next-post-issue/#post-5566151)
 * I think PHP str_replace would fix this for you. Here is the code that should 
   work
 *     ```
       <div class="right-side">
   
       	<?php
       				if( $prev_link != NULL ) {
       					$prev_link = str_replace("http://", "http://adf.ly/527275432/", $prev_link);
       					echo $prev_link . "<i title='Last Episode' class='playerleft tooltips fa fa-angle-double-left'> </i></a>";
       				}
       				?>
   
       <a class="tooltips" title='View all <?php echo $name; ?> Episodes' href='<?php echo $series_link; ?>'><i class="allepisodes fa fa-sort-amount-asc"></i></a>
       	<?php
       				if( $next_link != NULL ) {
       					$next_link = str_replace("http://", "http://adf.ly/527275432/", $next_link);
       					echo $next_link . "<i title='Next Episode'class='playerright tooltips fa fa-angle-double-right'> </i></a>";
       				}
       				?>
   
       </div> <!-- End of right side -->
       ```
   
 *  Thread Starter [needhelpwithnimble](https://wordpress.org/support/users/needhelpwithnimble/)
 * (@needhelpwithnimble)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-next-post-issue/#post-5566155)
 * THANK YOU SOOOOOOO MUCHHH 😀
 * whats your paypal i owe you 🙂
 *  [Ramesh (thecodeisclear)](https://wordpress.org/support/users/thecodeisclear/)
 * (@thecodeisclear)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-next-post-issue/#post-5566160)
 * Glad to see it worked out. Paypal.. it really is not necessary. There are some
   great volunteers in the forums and I am just a beginner.
 * _PS: You can tip any charity of your choice and I think we can call it even 😉_
 *  Thread Starter [needhelpwithnimble](https://wordpress.org/support/users/needhelpwithnimble/)
 * (@needhelpwithnimble)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-next-post-issue/#post-5566161)
 * That’s nice of you. Thanks again.

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

The topic ‘WordPress Next Post Issue’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [needhelpwithnimble](https://wordpress.org/support/users/needhelpwithnimble/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-next-post-issue/#post-5566161)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
