astra_number_pagination()

Astra Pagination


Description


Return

(void) Generate & echo pagination markup.


Source

File: inc/markup-extras.php

	function astra_number_pagination() {
		global $wp_query;
		$enabled = apply_filters( 'astra_pagination_enabled', true );

		// Don't print empty markup if their is only one page.
		if ( $wp_query->max_num_pages < 2 || ! $enabled ) {
			return;
		}

			ob_start();
			echo "<div class='ast-pagination'>";
			the_posts_pagination(
				array(
					'prev_text'    => astra_default_strings( 'string-blog-navigation-previous', false ),
					'next_text'    => astra_default_strings( 'string-blog-navigation-next', false ),
					'taxonomy'     => 'category',
					'in_same_term' => true,
				)
			);
			echo '</div>';
			$output = ob_get_clean();
			echo apply_filters( 'astra_pagination_markup', $output ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.