Query values from a Post Object Repeater [closed]

Try this alternative way of getting the post objects. Seeing as your loop seems to be using the global post data anyway, this method uses setup_postdata to set the global values. $post_objects = get_field(‘post_objects’); if( $post_objects ): ?> <ul> <?php foreach( $post_objects as $post): // variable must be called $post (IMPORTANT) ?> <?php setup_postdata($post); ?> … Read more

How to use thumbnail size of image if I’m only using src to get image

Since you are using get_sub_field() i assume you are inside a have_rows() (a repeater), in theory it should work like this: $image = get_sub_field(‘image’); <img src=”https://wordpress.stackexchange.com/questions/278286/<?php echo $image[“url’]; ?>” alt=”https://wordpress.stackexchange.com/questions/278286/<?php echo $image[“alt’] ?>” /> and this is what you can get: $image[‘url’] //this is the full image echo $image[‘sizes’][‘medium’]; //medium image echo $image[‘sizes’][‘thumbnail’]; //thumbnail image … Read more