Skip to content

Instantly share code, notes, and snippets.

@daveis
Created September 20, 2014 15:13
Show Gist options
  • Save daveis/4c949e9c5fa4ded044af to your computer and use it in GitHub Desktop.
Save daveis/4c949e9c5fa4ded044af to your computer and use it in GitHub Desktop.
Prev/Next article titles in article.php for my Manifesto theme in Anchor CMS
<nav class="pagination container clearfix">
<a<?php echo (article_previous_url() ? ' href="' . article_previous_url() . '"' : ''); ?>>
<i class="fa fa-chevron-circle-left"></i><span> <?php echo dg_article_previous_title(); ?></span>
</a>
<a<?php echo (article_next_url() ? ' href="' . article_next_url() . '"' : ''); ?>>
<span><?php echo dg_article_next_title(); ?> </span><i class="fa fa-chevron-circle-right"></i>
</a>
</nav>
@daveis
Copy link
Author

daveis commented Sep 20, 2014

This code goes in the article.php file in my Manifesto theme.

This should replace all pagination code on lines 83 - 85.

Requires the custom dg_article_previous_title(); function in the themes functions.php file. You can find the code for that custom function here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment