summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authordaniel g. siegel2014-02-04 20:45:46 +0100
committerdaniel g. siegel2014-02-04 20:51:23 +0100
commit2b0a7a3cf50004a0f29fa834cec703f4f87d0d7b (patch)
treecbfa42ed190158aa9372b656f45bb3233f96cf11 /functions.php
parent4a8adf80b964d97575248f8d874717f152498f31 (diff)
downloadwp-remulus-2b0a7a3cf50004a0f29fa834cec703f4f87d0d7b.tar.gz
wp-remulus-2b0a7a3cf50004a0f29fa834cec703f4f87d0d7b.tar.bz2
wp-remulus-2b0a7a3cf50004a0f29fa834cec703f4f87d0d7b.zip
remove unneeded code
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php30
1 files changed, 24 insertions, 6 deletions
diff --git a/functions.php b/functions.php
index 1497c8a..0ae4f74 100644
--- a/functions.php
+++ b/functions.php
@@ -52,12 +52,30 @@ function remulus_scripts() {
}
add_action( 'wp_enqueue_scripts', 'remulus_scripts' );
-/**
- * Custom template tags for this theme.
- */
-require get_template_directory() . '/inc/template-tags.php';
/**
- * Custom functions that act independently of the theme templates.
+ * Display navigation to next/previous set of posts when applicable.
*/
-require get_template_directory() . '/inc/extras.php';
+if ( ! function_exists( 'remulus_paging_nav' ) ) :
+function remulus_paging_nav() {
+ // Don't print empty markup if there's only one page.
+ if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {
+ return;
+ }
+ ?>
+ <article>
+ <nav class="navigation paging-navigation" role="navigation">
+ <div class="nav-links">
+ <?php if ( get_next_posts_link() ) : ?>
+ <div class="nav-previous"><?php next_posts_link( __( 'Older posts', 'remulus' ) ); ?></div>
+ <?php endif; ?>
+
+ <?php if ( get_previous_posts_link() ) : ?>
+ <div class="nav-next"><?php previous_posts_link( __( 'Newer posts', 'remulus' ) ); ?></div>
+ <?php endif; ?>
+ </div>
+ </nav>
+ <article>
+ <?php
+}
+endif;