Job’s don’t have parents – they are not hierarchical. So I’m not sure what you’re trying to do.
In general, you get the parent ID with $post->post_parent anyway.
with the job application created post in a job , what I want is to display the post meta of job within the job application
Hi there,
Still confused about what you are trying to do here but will try to help.
Can you try one more time (from the beginning) what you are trying to achieve and Mike and I can help point you in the right direction.
Kind Regards,
Scott
Yes, sorry for my English .
What I seek is this;
I have a page that has the salary meta, then I want show this field salary in another page or post
Page 1 : Has the salary meta
Page 2 shows the same salary meta
I tried to “get post meta” , but shows the salary field of that post and not from page 1 , not if you understand me.
You mentioned applications; did you try replacing $post->ID with $post->post_parent? That is the ID of the job in the case of applications.
Yes, i try;
<?php echo get_post_meta( $post->post_parent, ‘_salary’, true ); ?>
but not working.
what I want is that in the job- application.php file display a meta file to content- job_listing.php or content-single-job_listing.php
or otherwise in page “applications” certain meta fields in the “job” see page
There is no job-application.php. Why don’t you upload your full code/file for us?
what I want is this, I have a page where applications do a specific job and the portion of code that controls this is this is :
<section class=”job-application-content”>
<?php job_application_meta( $application ); ?>
<div id=”info”><h5>Estos son los campos del empleo al que estas optando</h5></div>
<div id=”salario”><h5>Salario:
<?php echo get_post_meta( $post->post_parent, ‘_salary’, true ); ?></h5></div>
</section>
This:
<div id=”salario”><h5>Salario:
<?php echo get_post_meta( $post->post_parent, ‘_salary’, true ); ?></h5></div>
should show ” salary ” published in the job
Ok, $application is the ‘post’ in this case, so you need to use:
$application->post_parent
to get the job ID.
WOW!!!!!! You are a Genuis!!, Thats Work!
Thanks you!!!