Nested Wordpress Post Object loops with Advanced Custom Fields2019 Community Moderator ElectionUsing post object inside ACF repeater fieldAdvanced Custom Fields in Page templateQuery posts based on post object - advance custom fieldsDisplaying content of Advanced Custom FieldsWordpress ACF post_object to show all custom fields inside another group fieldWordpress Advanced Custom Fields LOOP posts ACF by valuesNested relationship ACF field not calling correct contentMix post-object with sub fields in ACFUnable to make multiple calls to separate post object fields with get_field() wordpressAdvanced Custom Field | Post Objects within a repeater dosen´t work
How could a female member of a species produce eggs unto death?
Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?
When were linguistics departments first established
Why must traveling waves have the same amplitude to form a standing wave?
Can infringement of a trademark be pursued for using a company's name in a sentence?
What is the difference between "shut" and "close"?
Should QA ask requirements to developers?
Replacing Windows 7 security updates with anti-virus?
If the Captain's screens are out, does he switch seats with the co-pilot?
Rejected in 4th interview round citing insufficient years of experience
Examples of odd-dimensional manifolds that do not admit contact structure
Plywood subfloor won't screw down in a trailer home
US to Europe trip with Canada layover- is 52 minutes enough?
Is it illegal in Germany to take sick leave if you caused your own illness with food?
What is the likely impact on flights of grounding an entire aircraft series?
Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements
Single word request: Harming the benefactor
My adviser wants to be the first author
Co-worker team leader wants to inject the crap software product of his friends into our development. What should I say to our common boss?
Decoding assembly instructions in a Game Boy disassembler
How can I discourage/prevent PCs from using door choke-points?
Best approach to update all entries in a list that is paginated?
Can "semicircle" be used to refer to a part-circle that is not a exact half-circle?
Is having access to past exams cheating and, if yes, could it be proven just by a good grade?
Nested Wordpress Post Object loops with Advanced Custom Fields
2019 Community Moderator ElectionUsing post object inside ACF repeater fieldAdvanced Custom Fields in Page templateQuery posts based on post object - advance custom fieldsDisplaying content of Advanced Custom FieldsWordpress ACF post_object to show all custom fields inside another group fieldWordpress Advanced Custom Fields LOOP posts ACF by valuesNested relationship ACF field not calling correct contentMix post-object with sub fields in ACFUnable to make multiple calls to separate post object fields with get_field() wordpressAdvanced Custom Field | Post Objects within a repeater dosen´t work
I'm looking to display a post object inside another post object.
This is useful to display content (that is containing post objects) from one page on another.
I expect this could be something that is not working with the repeated wp_reset_postdata.
Thankful for any ideas and suggestions.
<?php $post_object = get_sub_field('first-loop');
if( $post_object ):
$post = $post_object;
setup_postdata( $post ); ?>
<?php $post_object = get_sub_field('second-loop');
if( $post_object ):
$post = $post_object;
setup_postdata( $post ); ?>
<!-- advanded custom fields -->
<?php wp_reset_postdata();?>
<?php endif; ?>
<?php wp_reset_postdata();?>
<?php endif; ?>
php wordpress advanced-custom-fields
add a comment |
I'm looking to display a post object inside another post object.
This is useful to display content (that is containing post objects) from one page on another.
I expect this could be something that is not working with the repeated wp_reset_postdata.
Thankful for any ideas and suggestions.
<?php $post_object = get_sub_field('first-loop');
if( $post_object ):
$post = $post_object;
setup_postdata( $post ); ?>
<?php $post_object = get_sub_field('second-loop');
if( $post_object ):
$post = $post_object;
setup_postdata( $post ); ?>
<!-- advanded custom fields -->
<?php wp_reset_postdata();?>
<?php endif; ?>
<?php wp_reset_postdata();?>
<?php endif; ?>
php wordpress advanced-custom-fields
Can you share what field type you have selected forfirst-loop
andsecond-loop
in the backend? also what is the return format for both of these fields?
– Saqib Amin
Mar 7 at 11:23
@saqib-amin field type forfirst-loop
is Post Object and return format is Post Object. The same goes for thesecond-loop
. Thank you
– Åsmund Sollihøgda
Mar 7 at 12:33
since you are usingget_sub_field
there has to be a parentrepeater
field, can you share that field's name too?
– Saqib Amin
Mar 7 at 12:41
This is the code in which the mentioned snipped is:<?php if( have_rows('element') ): while ( have_rows('element') ) : the_row(); ?> <?php if( get_row_layout() == 'upcomming-events' ): ?> <?php endif; ?> <?php endwhile; endif; ?>
– Åsmund Sollihøgda
Mar 7 at 13:27
add a comment |
I'm looking to display a post object inside another post object.
This is useful to display content (that is containing post objects) from one page on another.
I expect this could be something that is not working with the repeated wp_reset_postdata.
Thankful for any ideas and suggestions.
<?php $post_object = get_sub_field('first-loop');
if( $post_object ):
$post = $post_object;
setup_postdata( $post ); ?>
<?php $post_object = get_sub_field('second-loop');
if( $post_object ):
$post = $post_object;
setup_postdata( $post ); ?>
<!-- advanded custom fields -->
<?php wp_reset_postdata();?>
<?php endif; ?>
<?php wp_reset_postdata();?>
<?php endif; ?>
php wordpress advanced-custom-fields
I'm looking to display a post object inside another post object.
This is useful to display content (that is containing post objects) from one page on another.
I expect this could be something that is not working with the repeated wp_reset_postdata.
Thankful for any ideas and suggestions.
<?php $post_object = get_sub_field('first-loop');
if( $post_object ):
$post = $post_object;
setup_postdata( $post ); ?>
<?php $post_object = get_sub_field('second-loop');
if( $post_object ):
$post = $post_object;
setup_postdata( $post ); ?>
<!-- advanded custom fields -->
<?php wp_reset_postdata();?>
<?php endif; ?>
<?php wp_reset_postdata();?>
<?php endif; ?>
php wordpress advanced-custom-fields
php wordpress advanced-custom-fields
asked Mar 7 at 11:00
Åsmund SollihøgdaÅsmund Sollihøgda
3210
3210
Can you share what field type you have selected forfirst-loop
andsecond-loop
in the backend? also what is the return format for both of these fields?
– Saqib Amin
Mar 7 at 11:23
@saqib-amin field type forfirst-loop
is Post Object and return format is Post Object. The same goes for thesecond-loop
. Thank you
– Åsmund Sollihøgda
Mar 7 at 12:33
since you are usingget_sub_field
there has to be a parentrepeater
field, can you share that field's name too?
– Saqib Amin
Mar 7 at 12:41
This is the code in which the mentioned snipped is:<?php if( have_rows('element') ): while ( have_rows('element') ) : the_row(); ?> <?php if( get_row_layout() == 'upcomming-events' ): ?> <?php endif; ?> <?php endwhile; endif; ?>
– Åsmund Sollihøgda
Mar 7 at 13:27
add a comment |
Can you share what field type you have selected forfirst-loop
andsecond-loop
in the backend? also what is the return format for both of these fields?
– Saqib Amin
Mar 7 at 11:23
@saqib-amin field type forfirst-loop
is Post Object and return format is Post Object. The same goes for thesecond-loop
. Thank you
– Åsmund Sollihøgda
Mar 7 at 12:33
since you are usingget_sub_field
there has to be a parentrepeater
field, can you share that field's name too?
– Saqib Amin
Mar 7 at 12:41
This is the code in which the mentioned snipped is:<?php if( have_rows('element') ): while ( have_rows('element') ) : the_row(); ?> <?php if( get_row_layout() == 'upcomming-events' ): ?> <?php endif; ?> <?php endwhile; endif; ?>
– Åsmund Sollihøgda
Mar 7 at 13:27
Can you share what field type you have selected for
first-loop
and second-loop
in the backend? also what is the return format for both of these fields?– Saqib Amin
Mar 7 at 11:23
Can you share what field type you have selected for
first-loop
and second-loop
in the backend? also what is the return format for both of these fields?– Saqib Amin
Mar 7 at 11:23
@saqib-amin field type for
first-loop
is Post Object and return format is Post Object. The same goes for the second-loop
. Thank you– Åsmund Sollihøgda
Mar 7 at 12:33
@saqib-amin field type for
first-loop
is Post Object and return format is Post Object. The same goes for the second-loop
. Thank you– Åsmund Sollihøgda
Mar 7 at 12:33
since you are using
get_sub_field
there has to be a parent repeater
field, can you share that field's name too?– Saqib Amin
Mar 7 at 12:41
since you are using
get_sub_field
there has to be a parent repeater
field, can you share that field's name too?– Saqib Amin
Mar 7 at 12:41
This is the code in which the mentioned snipped is:
<?php if( have_rows('element') ): while ( have_rows('element') ) : the_row(); ?> <?php if( get_row_layout() == 'upcomming-events' ): ?> <?php endif; ?> <?php endwhile; endif; ?>
– Åsmund Sollihøgda
Mar 7 at 13:27
This is the code in which the mentioned snipped is:
<?php if( have_rows('element') ): while ( have_rows('element') ) : the_row(); ?> <?php if( get_row_layout() == 'upcomming-events' ): ?> <?php endif; ?> <?php endwhile; endif; ?>
– Åsmund Sollihøgda
Mar 7 at 13:27
add a comment |
1 Answer
1
active
oldest
votes
try,
<?php $post_object = get_sub_field('first-loop');
if( $post_object ):
$post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object.
setup_postdata( $post1 ); ?>
<?php $post_object = get_sub_field('second-loop');
if( $post_object ):
$post2 = $post_object;
wp_reset_postdata();
setup_postdata( $post2 ); ?>
<!-- advanded custom fields -->
<?php wp_reset_postdata();
setup_postdata( $post1 ); ?>
<?php endif; ?>
<?php wp_reset_postdata();?>
<?php endif; ?>
Thank you for the quick responce @jaydip ! However, it seems that I'm not allowed to change $post to $post1. When I do, links for example are showing the current page (index) and not the post-id page (events).<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object. setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:07
@ÅsmundSollihøgda You can create double variables, like add$post = $post1
and use$post1
to set post data and again change$post
variable with new post data when you set it.
– Jaydip Nimavat
Mar 7 at 12:15
Thank you again for the quick feedback. I tried to implement your suggestion without luck. Maybe I'm doing something wrong?<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post = $post1; $post1 = $post_object; setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:30
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55042207%2fnested-wordpress-post-object-loops-with-advanced-custom-fields%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
try,
<?php $post_object = get_sub_field('first-loop');
if( $post_object ):
$post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object.
setup_postdata( $post1 ); ?>
<?php $post_object = get_sub_field('second-loop');
if( $post_object ):
$post2 = $post_object;
wp_reset_postdata();
setup_postdata( $post2 ); ?>
<!-- advanded custom fields -->
<?php wp_reset_postdata();
setup_postdata( $post1 ); ?>
<?php endif; ?>
<?php wp_reset_postdata();?>
<?php endif; ?>
Thank you for the quick responce @jaydip ! However, it seems that I'm not allowed to change $post to $post1. When I do, links for example are showing the current page (index) and not the post-id page (events).<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object. setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:07
@ÅsmundSollihøgda You can create double variables, like add$post = $post1
and use$post1
to set post data and again change$post
variable with new post data when you set it.
– Jaydip Nimavat
Mar 7 at 12:15
Thank you again for the quick feedback. I tried to implement your suggestion without luck. Maybe I'm doing something wrong?<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post = $post1; $post1 = $post_object; setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:30
add a comment |
try,
<?php $post_object = get_sub_field('first-loop');
if( $post_object ):
$post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object.
setup_postdata( $post1 ); ?>
<?php $post_object = get_sub_field('second-loop');
if( $post_object ):
$post2 = $post_object;
wp_reset_postdata();
setup_postdata( $post2 ); ?>
<!-- advanded custom fields -->
<?php wp_reset_postdata();
setup_postdata( $post1 ); ?>
<?php endif; ?>
<?php wp_reset_postdata();?>
<?php endif; ?>
Thank you for the quick responce @jaydip ! However, it seems that I'm not allowed to change $post to $post1. When I do, links for example are showing the current page (index) and not the post-id page (events).<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object. setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:07
@ÅsmundSollihøgda You can create double variables, like add$post = $post1
and use$post1
to set post data and again change$post
variable with new post data when you set it.
– Jaydip Nimavat
Mar 7 at 12:15
Thank you again for the quick feedback. I tried to implement your suggestion without luck. Maybe I'm doing something wrong?<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post = $post1; $post1 = $post_object; setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:30
add a comment |
try,
<?php $post_object = get_sub_field('first-loop');
if( $post_object ):
$post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object.
setup_postdata( $post1 ); ?>
<?php $post_object = get_sub_field('second-loop');
if( $post_object ):
$post2 = $post_object;
wp_reset_postdata();
setup_postdata( $post2 ); ?>
<!-- advanded custom fields -->
<?php wp_reset_postdata();
setup_postdata( $post1 ); ?>
<?php endif; ?>
<?php wp_reset_postdata();?>
<?php endif; ?>
try,
<?php $post_object = get_sub_field('first-loop');
if( $post_object ):
$post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object.
setup_postdata( $post1 ); ?>
<?php $post_object = get_sub_field('second-loop');
if( $post_object ):
$post2 = $post_object;
wp_reset_postdata();
setup_postdata( $post2 ); ?>
<!-- advanded custom fields -->
<?php wp_reset_postdata();
setup_postdata( $post1 ); ?>
<?php endif; ?>
<?php wp_reset_postdata();?>
<?php endif; ?>
answered Mar 7 at 11:23
Jaydip NimavatJaydip Nimavat
188217
188217
Thank you for the quick responce @jaydip ! However, it seems that I'm not allowed to change $post to $post1. When I do, links for example are showing the current page (index) and not the post-id page (events).<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object. setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:07
@ÅsmundSollihøgda You can create double variables, like add$post = $post1
and use$post1
to set post data and again change$post
variable with new post data when you set it.
– Jaydip Nimavat
Mar 7 at 12:15
Thank you again for the quick feedback. I tried to implement your suggestion without luck. Maybe I'm doing something wrong?<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post = $post1; $post1 = $post_object; setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:30
add a comment |
Thank you for the quick responce @jaydip ! However, it seems that I'm not allowed to change $post to $post1. When I do, links for example are showing the current page (index) and not the post-id page (events).<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object. setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:07
@ÅsmundSollihøgda You can create double variables, like add$post = $post1
and use$post1
to set post data and again change$post
variable with new post data when you set it.
– Jaydip Nimavat
Mar 7 at 12:15
Thank you again for the quick feedback. I tried to implement your suggestion without luck. Maybe I'm doing something wrong?<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post = $post1; $post1 = $post_object; setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:30
Thank you for the quick responce @jaydip ! However, it seems that I'm not allowed to change $post to $post1. When I do, links for example are showing the current page (index) and not the post-id page (events).
<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object. setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:07
Thank you for the quick responce @jaydip ! However, it seems that I'm not allowed to change $post to $post1. When I do, links for example are showing the current page (index) and not the post-id page (events).
<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post1 = $post_object; // this should be post object not id, if id then use get_post function and use post object. setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:07
@ÅsmundSollihøgda You can create double variables, like add
$post = $post1
and use $post1
to set post data and again change $post
variable with new post data when you set it.– Jaydip Nimavat
Mar 7 at 12:15
@ÅsmundSollihøgda You can create double variables, like add
$post = $post1
and use $post1
to set post data and again change $post
variable with new post data when you set it.– Jaydip Nimavat
Mar 7 at 12:15
Thank you again for the quick feedback. I tried to implement your suggestion without luck. Maybe I'm doing something wrong?
<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post = $post1; $post1 = $post_object; setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:30
Thank you again for the quick feedback. I tried to implement your suggestion without luck. Maybe I'm doing something wrong?
<?php $post_object = get_sub_field('page-link'); if( $post_object ): $post = $post1; $post1 = $post_object; setup_postdata( $post1 ); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php wp_reset_postdata();?> <?php endif; ?>
– Åsmund Sollihøgda
Mar 7 at 12:30
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55042207%2fnested-wordpress-post-object-loops-with-advanced-custom-fields%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you share what field type you have selected for
first-loop
andsecond-loop
in the backend? also what is the return format for both of these fields?– Saqib Amin
Mar 7 at 11:23
@saqib-amin field type for
first-loop
is Post Object and return format is Post Object. The same goes for thesecond-loop
. Thank you– Åsmund Sollihøgda
Mar 7 at 12:33
since you are using
get_sub_field
there has to be a parentrepeater
field, can you share that field's name too?– Saqib Amin
Mar 7 at 12:41
This is the code in which the mentioned snipped is:
<?php if( have_rows('element') ): while ( have_rows('element') ) : the_row(); ?> <?php if( get_row_layout() == 'upcomming-events' ): ?> <?php endif; ?> <?php endwhile; endif; ?>
– Åsmund Sollihøgda
Mar 7 at 13:27