Viewing 5 replies - 1 through 5 (of 5 total)
  • What theme are you using?

    Thread Starter needhelpwithnimble

    (@needhelpwithnimble)

    The theme is called ‘parament’

    This is doable by filtering the output of previous_post_link(). You should make this change in a child theme. If you modify the theme files directly, you will lose this change if the theme is updated in the future, to fix a security vulnerability or to fix bugs or to add new features.

    In your child theme’s functions.php, paste this code:

    function modify_prev_link( $link ) {
      $link = str_replace( "href=\"https://", "href=\"https://adf.ly/527274352/", $link );
      return $link;
    }
    add_filter( 'previous_post_link', 'modify_prev_link' );
    
    function modify_next_link( $link ) {
      $link = str_replace( "href=\"https://", "href=\"https://adf.ly/527274352/", $link );
      return $link;
    }
    add_filter( 'next_post_link', 'modify_next_link' );
    Thread Starter needhelpwithnimble

    (@needhelpwithnimble)

    Hey man, that worked great for some of my links, but the rest of them are controlled by this:

    <div class="nav-older">
    		<?php $prev_link = get_episode_link($slug, $prev_epnum, $subdub ); ?>
    		<?php echo '<a href="' . $prev_link['permalink'] . '">' . '? ' . $prev_link['title'] . '</a>'; ?>
    		</div>
    		<div class="nav-newer">
    		<?php $next_link = get_episode_link($slug, $next_epnum, $subdub ); ?>
    		<?php echo '<a href="' . $next_link['permalink'] . '">' . $next_link['title'] . ' ?</a>'; ?>
    		</div>

    It didn’t apply for those ones!

    Thread Starter needhelpwithnimble

    (@needhelpwithnimble)

    Never mind, i got it! thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to edit link templates?’ is closed to new replies.