From 8c3ada14a64313b2edf794bc0432d32d68f94cfd Mon Sep 17 00:00:00 2001 From: koenemann Date: Tue, 7 Feb 2017 15:30:03 +0100 Subject: [PATCH] cleanup inc folder and add wordpress.com stuff --- inc/extras.php | 37 +++++++++++++++++++++++++++++++++++++ inc/style-wpcom.css | 7 +++++++ 2 files changed, 44 insertions(+) create mode 100644 inc/style-wpcom.css diff --git a/inc/extras.php b/inc/extras.php index 4ca1f82..16c8882 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -74,3 +74,40 @@ if ( ! function_exists( 'change_logo_class' ) ) { return $html; } } + +/** + * Display navigation to next/previous post when applicable. + */ +if ( ! function_exists( 'understrap_post_nav' ) ) : + + function understrap_post_nav() { + // Don't print empty markup if there's nowhere to navigate. + $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); + $next = get_adjacent_post( false, '', false ); + + if ( ! $next && ! $previous ) { + return; + } + ?> + +
+
+ +
+
+