Created
November 23, 2015 05:02
-
-
Save tonyedwardspz/974331e00da41f510c6d to your computer and use it in GitHub Desktop.
Flip Ahead browsing
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
<?php | |
$single = (is_single() ? TRUE : FALSE); | |
if ($single){ | |
$prevPost = get_previous_post(); | |
if (!empty( $prevPost )){ ?> | |
<link rel="prev" href="<?php echo get_permalink($prevPost->ID); ?>"/> | |
<?php } | |
$nextPost = get_next_post(); | |
if (!empty( $nextPost )) { ?> | |
<link rel="next" href="<?php echo get_permalink($nextPost->ID); ?>"/> | |
<?php } | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment