Hi,
Awesome plugin! I’m using it a lot.
At the moment I’m running into the following problem:
I’m having a custom page, everything is inside the have_posts while loop:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php endwhile; endif; ?>
As explained on your website, I use the following code to display an image from an custom field:
<?php
$image = get_field('image');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php endif; ?>
This works, BUT it stops working right after I use WP_query to display a few custom posts above the image:
<?php
$args = array( 'post_type' => 'bruiloft', 'posts_per_page' => 4, 'orderby' => 'menu_order', 'order' => 'ASC');
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), false, '' );
?>
<?php endwhile; ?>
There are custom fields inside the custom post type as well and these work.
I don’t know what else to do, I need both the custom fields aswell as the custom post type