wordpress 前の記事、次の記事 タクソノミーないだけで遷移させる

        <div class="container">
            <div class="detail_bottom">
<?php
$prevpost = get_adjacent_post(true, '', true, 'case_typ'); //前の記事
$nextpost = get_adjacent_post(true, '', false, 'case_typ'); //次の記事

if( $prevpost or $nextpost ){ //前の記事、次の記事いずれか存在しているとき
	if ( $prevpost ) { //前の記事が存在しているとき
		if (has_post_thumbnail() )	{
			$image_url = wp_get_attachment_image_src(get_post_thumbnail_id($prevpost->ID), 'medium');
		}
	    echo '<div class="detail_link_left"><a href="' . get_permalink($prevpost->ID) . '"><div class="link_img_left"><img src="' . $image_url[0] .' "></div><p>'; echo get_the_title($prevpost->ID); echo '</p></div></a>'; 
	 } 
	
	if ( $nextpost ) { //次の記事が存在しているとき
		if (has_post_thumbnail() )	{
			$image_url = wp_get_attachment_image_src(get_post_thumbnail_id($nextpost->ID), 'medium');
		}
	    echo '<div class="detail_link_right"><a href="' . get_permalink($nextpost->ID) . '"><div class="link_img_right"><img src="' . $image_url[0] .' "></div><p>'; echo get_the_title($nextpost->ID); echo '</p></div></a>';
	}
}
 ?> 
            </div>
        </div>