WordPress Supports pagination and has default functions which can be used to display pagination. For Example: In Blog page pagination is displayed by default. But sometimes you needs to add pagination to a custom template. In Some scenarios we needs to get the current page number in the pagination.
Current page number in Pagination can be retrived in the following way.
Current page number in Pagination can be retrived in the following way.
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
?>
Here $paged will contain the page number.
No comments:
Post a Comment