Pagination is not working using WP_Query

The easiest way to have page nav for the custom post is to use WP PageNavi. After activating this plugin you need to add the following code in your custom post template.

<?php
    if(function_exists('wp_pagenavi')) {
        wp_pagenavi( array(
            'query' =>$loop
        ));
    }

Leave a Comment