Home › Forums › General Issues › Second slug/template for CPT with ACF › Reply To: Second slug/template for CPT with ACF
Just to confirm that I understand correctly, on the job’s page you want a link to apply for the job?
If that’s the case, why aren’t you passing the post ID of the job as a query variable (e.g. https://yoursite.com/apply-to-jobs/?job=YOUR_JOBS_POST_ID)?
If you want a secondary slug for your jobs (so the URLs are prettier), it is possible to add an additional endpoint to existing URLs using add_rewrite_endpoint
. If you were to go this route you could have a URL that looks like https://yoursite.com/job-a/apply/
You would then use the template_redirect
hook to load a different template that has a form (but you’d still be able to get the original job’s ID) so that you could inject the name of the job in the form.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.