简体   繁体   中英

How to create a route with an appended path on a custom post type slug in Wordpress

I have a custom post type, "Job Posts", and with a slug re-write rule a single job posting can be viewed at the path /careers/marketing_specialist . That works well, but I would like to have a job application link on that page that would take them to /careers/marketing_specialist/apply . Is this possible in wordpress? I would like the path for any job application to be /careers/{job_post}/apply .

Thanks, Mike

Yes, it's possible. Take a look at the Rewrite Endpoints API .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM