In a job application website im trying to make a button 'apply now' that is on the 'job page (custom post type)'.
This button will create a new custom post type 'application' AND this button must connect a one-to-many relationship between 'jobs' and 'applications'
Can you give me a step by step guide on making this button? (im not working in the blocks editor)
The end purpose is to display content from the author (job poster) and user that applied in the custom post type 'application' -> page that displays for example both their names and picture + all info from the job.
Thank you!
Hi,
Thank you for contacting us and I'd be happy to assist.
To achieve this, you can include a new post form that adds a new "Application", in the single "Job" page template.
This form should have only two items:
1. The "Job Application" relationship field to pick the job that should be connected to the newly added application post.
2. The submit button.
In the field's default value, you can include the post ID shortcode '[wpv-post-id]'
( screenshot: hidden link )
As a result, when the form will load on the single "Job" page, the current "Job" post will automatically be selected in this relationship field. You can include some custom CSS code in the form, to hide this relationship field from showing, so visitors can't change the selected "Job" post in the field.
The visitors will see only the submit button from the form and on submission, a new application post will be created and connected to the current job.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
My issue is resolved now. Thank you!