admin管理员组

文章数量:1130349

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

http://localhost/author/james/

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

http://localhost/author/james/print

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 ?

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

http://localhost/author/james/

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

http://localhost/author/james/print

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 ?

本文标签: Change Page Template Based on URL Rewrite in WordPress