Thread Starter
dharry
(@dharry)
ok, I figured out the $job fields but can’t seem to get the company fields:
$company = get_post_meta( $job->ID )[‘_user_company_name’][0]; – This doesn’t work
$location = get_post_meta( $job->ID )[‘_job_location’][0]; – This does work
and yes, I check the meta name on the Company field and it is definitely correct.
Dean
Thread Starter
dharry
(@dharry)
also, how do I get the job URL after job submission?
Hi there!
We have a few helper functions located in wp-job-manager-template.php that might be useful. For example, you can get the company name from get_the_company_name( $job ). Additionally, you should be able to retrieve the company name from the _company_name post meta for the job. You can see more of these fields here.
You can get the URL for the job by calling get_permalink( $job ). However, unless you have disabled moderation (admin has to go in and approve the job listing), that link won’t work immediately after the job has been submitted.
Jake M.
Thread Starter
dharry
(@dharry)
Thanks Jake, that’s awesome…
Cheers
Dean
-
This reply was modified 7 years, 1 month ago by
dharry.
Thread Starter
dharry
(@dharry)
Hi Jake,
I am trying to get the category name from the array returned with wpjm_get_the_job_categories but having trouble getting just the name, the array is returning fine for the job as per:
Array ([0] => Array([0] => WP_Term Object([term_id] => 95[name] => Certificate III[slug] => certificate-iii[term_group] => 0[term_taxonomy_id] => 95[taxonomy] => job_listing_category[description] => Certificate III in Child Care[parent] => 0[count] => 1[filter] => raw)) )
I tried $cert = array_column($certification, ‘name’) but that didn’t seem to work… my php skills are not the best, would appreciate a pointer?
Thanks
Dean
Thread Starter
dharry
(@dharry)
Hi Jake, not to worry, all sorted now 🙂
Thanks anyway.
Regards,
Dean