Support

Account

Home Forums Backend Issues (wp-admin) WP Media Uploader missing Attachment Display Settings

Solving

WP Media Uploader missing Attachment Display Settings

  • I am using the “Repeater Fields” addon to add fields to upload images into a slider custom post type. This works great except that the Attachment Display Settings are missing in the Media Uploader.

    Any idea why these are missing and how to get them to show up?

    Thanks!

  • Hi @mccawphoto

    Can you show a screenshot?

    Thanks
    E

  • This shows what my media uploader looks like when using it with my custom post type:
    When used with a custom post type

    This is what I want it to look like:
    What I want it to look like

    This is what is missing:
    What is missing

  • We are in the same boat, we are using a custom plugin that utilizes the menu on the left for specific actions to happen if they upload the image through the uploader.

    Would be great to have the option on a per field basis or global, either would work fine.

  • Hi @mccawphoto

    Thanks for the info, yes, this would be great, but unfortunatly, the image field does not currently support this extra meta data, only the image ID.

    Perhaps an advanced image field could be created for this extra data? Or maybe use a sub field for the size / link?

    Thanks
    E

  • Hi @elliot,

    We are looking to just save the imageID in the field but we need the option for a sidebar to use a plugin for loading retina specific images.

    Anyway we could get a sidebar in there? Is there a hook we could right into the theme to override this?

  • Hi @elliot,

    If I use an advanced image field or sub field how do I get the correct image size to be pulled in? I wanted to have the ability to select a pre-set size because my client is very computer illiterate and I need to make this as simple as possible.

  • Hi @mccawphoto

    Have you checked out the image field documentation? This is all explained!

    Thanks
    E

  • 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:

    Image of how repeater field is set up

    The image sub field and how it is set up

    Any idea what I am doing wrong?

  • Hi @mccawphoto

    Your code shows that you have not fully grasped the concept of how the data is loaded.

    Your code contains:

    
    $size = "full"; // (thumbnail, medium, large, full or custom size)
    					$image = wp_get_attachment_image_src( $attachment_id, $size );
    

    But what is $attachment_id?

    Also, why does your code not contain a has_sub_field loop?

    Can you please double check the documentation for this has_sub_field function and fully understand how you can get sub field data, then, please feel free to ask any specific questions.

    Thanks
    E

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘WP Media Uploader missing Attachment Display Settings’ is closed to new replies.