How to change default page slug?

95 Views Asked by At

I have a CPT called jobs and a page named Job Apply. I am trying to achieve something like below url:

http://example.com/job-slug/apply

Where, job-slug can be any job. i.e Programmer, Developer etc..

On clicking job's apply button, it should open an apply page which consists a simple form, but url should be as mentioned above.

I am trying to achieve it by using add_rewrite_rule(), but after trying too much, it is still redirecting me on the below url:

http://example.com/apply

Any help would be appreciated. Thanks in advance.

0

There are 0 best solutions below