Home › Forums › Backend Issues (wp-admin) › WP Media Uploader missing Attachment Display Settings › Reply To: WP Media Uploader missing Attachment Display Settings
Hi @elliot,
I have checked the documentation and am unable to get my images to show up. The code in my template looks like this:
<div id="homeslide" class="flexslider">
<ul class="slides">
<?php
$args = array(
'post_type' => 'homeslider',
'posts_per_page' => -1,
'orderby'=> 'ID',
'order' => 'ASC'
);
$loop = new WP_Query( $args );
if( $loop->have_posts() ):
while ( $loop->have_posts() ) : $loop->the_post();
$size = "full"; // (thumbnail, medium, large, full or custom size)
$image = wp_get_attachment_image_src( $attachment_id, $size );
// url = $image[0];
// width = $image[1];
// height = $image[2];
// while(has_sub_field('slide_image')): ?>
<?php //$post_objects = get_sub_field('items'); ?>
<li>
<div class="slidetext">
<div class="headline"><h2><?php the_field('header_text'); ?></h2></div><!-- end headline -->
<div class="phototext"><?php the_field('small_text_under_header'); ?></div><!-- end phototext -->
</div><!-- end slidetext -->
<?php $attachment_id = get_field('slide_image'); ?>
<img class="image-class" alt="" src="<?php echo $image[0]; ?>" />
</li>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
</ul>
</div>
When looking at the source code on the page it looks like this:
<div id="homeslide" class="flexslider">
<ul class="slides">
<li>
<div class="slidetext">
<div class="headline"><h2></h2></div><!-- end headline -->
<div class="phototext"></div><!-- end phototext -->
</div><!-- end slidetext -->
<img class="image-class" alt="" src="" />
</li>
<li>
<div class="slidetext">
<div class="headline"><h2></h2></div><!-- end headline -->
<div class="phototext"></div><!-- end phototext -->
</div><!-- end slidetext -->
<img class="image-class" alt="" src="" />
</li>
</ul>
</div>
I have 2 images added and I see in the source that there are 2 rows but nothing is populating the rows.
Here are screenshots showing how I have the custom fields set up:
Any idea what I am doing wrong?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.