Unable to display paging navigation with a custom post type loop

What you are doing here is on the Bad Ideas list. While you can replace the query in template that tends to break things, especially pagination.

In simplified form let’s say you have 10 testimonials and your WP settings are 5 posts per page:

  • your template thinks there are 10 / 2 = 5 pages worth of testimonials
  • but WordPress thinks there are only 10 / 5 = 2 pages!

So when URL instructs WP to show page 3… WP thinks there is nothing there. And this is just the one of obvious ways in which it breaks.

For any modificaiton of main loops you need to be using filter like pre_get_posts and do it before template is even reached.