From 7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 7 Jan 2020 13:06:14 +0100 Subject: Added wordpress --- .../twentytwenty/template-parts/pagination.php | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 srcs/wordpress/wp-content/themes/twentytwenty/template-parts/pagination.php (limited to 'srcs/wordpress/wp-content/themes/twentytwenty/template-parts/pagination.php') diff --git a/srcs/wordpress/wp-content/themes/twentytwenty/template-parts/pagination.php b/srcs/wordpress/wp-content/themes/twentytwenty/template-parts/pagination.php new file mode 100644 index 0000000..b2a6aca --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentytwenty/template-parts/pagination.php @@ -0,0 +1,58 @@ +%s', + '', + __( 'Newer Posts', 'twentytwenty' ) +); +$next_text = sprintf( + '%s %s', + __( 'Older Posts', 'twentytwenty' ), + '' +); + +$posts_pagination = get_the_posts_pagination( + array( + 'mid_size' => 1, + 'prev_text' => $prev_text, + 'next_text' => $next_text, + ) +); + +// If we're not outputting the previous page link, prepend a placeholder with visibility: hidden to take its place. +if ( strpos( $posts_pagination, 'prev page-numbers' ) === false ) { + $posts_pagination = str_replace( '', $posts_pagination ); +} + +if ( $posts_pagination ) { ?> + +
+ + + + + +
+ +