'; $prevpost = get_adjacent_post('', '', true); /*前の記事*/ $nextpost = get_adjacent_post('', '', false); /*次の記事*/ if ($prevpost) { /*前の記事が存在しているとき*/ $thumurl = neatly_get_thumbnail( $prevpost->ID , 'thumbnail'); //wp_get_attachment_image_src (get_post_thumbnail_id ($prevpost->ID, true)); echo ''; if ($thumurl['has_image']){ echo '
'; echo ''. get_the_title($prevpost->ID) .''; echo '
'; } echo '

' . esc_html(mb_strimwidth(get_the_title($prevpost->ID), 0, 80, "...", 'UTF-8')) . '

'; }else{ echo '
'; echo '

'; } echo '
'.esc_html__( 'Prev', 'neatly' ).'
'; echo '
'; if ( $nextpost ) { /*次の記事が存在しているとき*/ $thumurl = neatly_get_thumbnail( $nextpost->ID , 'thumbnail'); //$thumurl = wp_get_attachment_image_src (get_post_thumbnail_id ($nextpost->ID, true)); echo ''; echo '

' . esc_html(mb_strimwidth(get_the_title($nextpost->ID), 0, 80, "...", 'UTF-8')) . '

'; if ($thumurl['has_image']){ echo '
'; echo ''. get_the_title($nextpost->ID) .''; echo '
'; } }else{ echo '
'; echo '

'; } echo '
'.esc_html__( 'Next', 'neatly' ).'
'; echo '
'; echo '';