I have created a custom post type author when it takes to single author details it was working fine. For example


It was showing single-author.php file. My question is when i am adding a print next to agent name in url for example


If there is print in the url then it needs to automatically redirect to a template present in template directory which is author-print.php

Is this is possible in wordpress ?

  • Possible duplicate of page_template toggle between 2 templates + 2 permalinks for same post – Milo Dec 22 '18 at 15:53
  • @Milo when it comes to custom post type it was not working it was working for blog posts alone – James Paul Dec 23 '18 at 13:55
  • Edit your question and add the code you use to register your post type, and anything else you may have tried in solving the problem. It's difficult to say what the problem is if we can't see what you've got. – Milo Dec 23 '18 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.