Infinite next and previous post looping in WordPress

Infinite next and previous post looping in WordPress If you are trying to find out which is your first post and last post you can add below function in your function.php file <?php /******************** * get first post ********************/ function aman_first_post() { global $post; $loop = get_posts( 'numberposts=1&amp;order=ASC' ); $first = $loop[0]-&gt;ID; return ( $post-&gt;ID... Continue Reading →

Create a website or blog at WordPress.com

Up ↑