Created
May 7, 2015 16:50
-
-
Save laurencebradford/3d3e7d1175ce2383521a to your computer and use it in GitHub Desktop.
broken next post code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="up-next"> | |
<?php | |
$post = get_previous_post(); | |
if( $post ) { | |
?> | |
<p>Read Next ... </p> | |
<?php | |
$post = get_previous_post(); | |
$id = $post->ID; | |
$image = get_the_post_thumbnail( $post->ID, 'bones-rect', array( | |
'title' => $post->post_title | |
)); | |
echo $image; | |
?> | |
<h4 class="h5"> | |
<a href="<?=get_permalink(get_the_ID())?>"><? the_title() ?></a> | |
</h4> | |
<a href="<?=get_permalink(get_the_ID())?>" class="btn btn-danger">read more <i class="fa fa-angle-double-right"></i></a> | |
<?php } ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment