Need to while loop and display contents in the subfield of a group field given by ACF

I need to display out the content inside the while loop and by taking the values that i have given in sub-field a group field created in ACF.

field group name:career_details
field group label:career details
field type:group
rule:page-template = career-page(my required page)
rule:page-template = career-page(my required page)
sub field name:job_position,job_location,job_description
sub fieled label:job position,job location,job description

theses are the details of field respectevely.

then i have added contents to the all sub fields.
when i try to run the following code ,there is no any output.
the contents inside the loop is disappeared.

<section class=”container” >

<?php if( have_rows(‘career_details’) ): //parent group field
while( have_rows(‘career_details’) ): the_row();

<div class=”row d-flex justify-content-center”>
<div class=”col-md-3 no-padd”>
<a class=”btn btn-success btn-lg green-buttn” href=””><h3 class=”h3
text-buttn text-uppercase”><?php the_sub_field(‘job_location’); ?>
<div class=”col-md-3 no-padd”>
<a class=”btn btn-danger btn-lg red-buttn” href=””><h3 class=”h3 text-
buttn text-uppercase”><?php the_sub_field(‘job_position’); ?></h3></a>
<div class=”col-md-6 no-padd d-block”>
<div class=”click-upload float-right”><a href=””><img class=”cv-img”
src=”<?php echo get_template_directory_uri(); ?>/images/cv-upload.jpg”

<div class=”click-upload float-right”><a href=””><p class=”cv-
text”>Click here to <br> upload your cv</p></a></div>
<hr class=”hr-dark”>

<div class=”row d-flex justify-content-start”>
<h3 class=”h3 small-head”>Details of this position</h3>
<p class=”h5 small-para”>
<?php the_sub_field(‘job_description’) ; ?>

<div class=”row d-flex justify-content-start bl-btn”>
<a class=”btn btn-primary blue-btn” href=””>
<p class=” text-uppercase name-btn”>apply now</p>

<?php endwhile; ?>
<?php endif; ?>



Can any one help me to find out

Read more here:: Need to while loop and display contents in the subfield of a group field given by ACF

Leave a Reply

Your email address will not be published. Required fields are marked *