I dont know if it is a rewrite issue. These are the facts:
I have a custom post type. Single page of this CPT is shown only if I have plain permalinks selected. Other configurations like post name returns 404 .
This problem only happens at remote server (staging and production). At development, all works.
Flushing permalinks does not work. What can be the cause? Thanks!
Is there a rewrite option in your $args_books?
Check if there is a .htaccess file present in the root of your remote server, if not create one and visit and save your permalink settings again. It’s probably a rewrite issue.