Skip to content

Instantly share code, notes, and snippets.

@laurencebradford
Created May 7, 2015 16:50
Show Gist options
  • Save laurencebradford/3d3e7d1175ce2383521a to your computer and use it in GitHub Desktop.
Save laurencebradford/3d3e7d1175ce2383521a to your computer and use it in GitHub Desktop.
broken next post code
<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