Created
December 3, 2018 06:03
-
-
Save mdjwel/d45a75fca555e48c8cddcb03693899db to your computer and use it in GitHub Desktop.
Next Previous Post Link
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 | |
$prev_post = get_previous_post(); | |
$next_post = get_next_post(); | |
if($prev_post) : ?> | |
<a href="<?php echo get_permalink($prev_post->ID) ?>" class="prev"><i class="ti-arrow-left"></i> | |
<?php esc_html_e('Prev Project', 'saasland') ?> | |
</a> | |
<?php endif; ?> | |
<?php if($next_post) : ?> | |
<a href="<?php echo get_permalink($next_post->ID) ?>" class="next">Next Project<i class="ti-arrow-right"></i></a> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment