Created
May 22, 2019 00:39
-
-
Save techmuzz/50cb8ef623b5fa1fce734b64ad6ce423 to your computer and use it in GitHub Desktop.
Show Previous/Next Article Link In Posts Without Plugin - https://www.techmuzz.com/how-to/wordpress/show-previousnext-article-link-in-posts-without-plugin/
This file contains hidden or 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
function techmuzz_navigation_links() { | |
if ( is_singular('post') ) { ?> | |
<div style="background: #eee; border: 1px solid #bbb;display:inline-block;padding:5px 10px 5px 10px;margin-bottom:10px;"> | |
<span class="nav-previous alignleft" style="width:45%;"> | |
<?php previous_post_link('<strong>%link</strong>', '<span style="color: #333;"><< Previous Post</span>', TRUE) ?><br/> | |
<?php previous_post_link('%link', '%title', TRUE) ?> | |
</span> | |
<span class="nav-next alignright" style="width:45%;"> | |
<?php next_post_link('<strong>%link</strong>', '<span style="color: #333;">Next Post >></span>', TRUE) ?><br/> | |
<?php next_post_link('%link', '%title', TRUE)?> | |
</span> | |
</div> | |
<?php | |
} | |
} | |
add_action('genesis_entry_footer', 'techmuzz_navigation_links' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment