WordPress custom post type endpoint

Requirement: If you want to add endpoint, let say “books” to  CPT author, and wants to change view in template. Solutions: No need to use “add_rewrite_endpoint” function because as of today, we can not add endpoint to CPT only ( we can add endpoints to either page or archives or all links, etc using  add_rewrite_endpoint function ) … Continued