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
// Return next and previous article titles | |
function dg_article_previous_title() { | |
$page = Registry::get('posts_page'); | |
$query = Post::where('created', '<', Registry::prop('article', 'created')) | |
->where('status', '!=', 'draft'); | |
if($query->count()) { | |
$article = $query->sort('created', 'desc')->fetch(); | |
$page = Registry::get('posts_page'); |
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
<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> |
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
<?php theme_include('header'); ?> | |
<div class="content-bg"> | |
<section class="article-posts"> | |
<!-- Check for posts --> | |
<?php if(has_posts()): ?> | |
<!-- Show the full version of most recent post -> |
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
<?php theme_include('header'); ?> | |
<div class="content-bg"> | |
<section class="article-posts"> | |
<!-- Check for posts --> | |
<?php if(has_posts()): ?> | |
<!-- Show the full version of most recent post -> |