Your code should hook the CPT registration to init
, though I don’t know if that is part of the issue.
Your code is relatively simple, and it works just fine for me when I test it.
Unless you’ve altered the main query, on the /books/accepting-yourself
archive page the Loop you’ve posted should return:
- The published posts
- In your “book” CPT
- In your “accepting-yourself” term
- Limited to the number you’ve selected in “Settings -> Reading” under
“Blog pages show at most”
It really sounds like item #4 is the problem. If you can verify that that is not it, then my next guess would be that something is already altering the main query and setting the posts_per_page
argument to 1
— probably a poorly written callback for the pre_get_posts
hook.
As mentioned, I tested your code and I do not get any unexpected behavior. Without more information, that is all I’ve got. If you can edit more detail into the question I’ll see what else I can do.