next_posts_link URL does not include name of custom post type
That is actually the expected output of next_posts_link(), i.e. it always uses the current page URL. And the same also applies to previous_posts_link(). So if you’re on the homepage (localhost/), then the URL of page 2 would be localhost/page/2, and if you’re on (your custom post type archive page at) localhost/todo, then the URL of … Read more