Posts page not showing correct image

If the theme you’re using is this: https://wordpress.org/themes/simple-business-wp/, then… This is the code responsible for images on the blog page: <?php if (has_post_thumbnail()) { the_post_thumbnail(‘nimbus_722_400’, array(‘class’ => ‘nimbus_722_400 img-responsive’)); } else { ?> <?php if ( (simple_business_wp_get_option(‘fp-news-thumbs-toggle’) == “1”) || (simple_business_wp_get_option(‘fp-news-thumbs-toggle’) == “”) ) { ?> <img src=”https://wordpress.stackexchange.com/questions/330187/<?php echo get_template_directory_uri(); ?>/assets/images/preview/722×400-<?php echo rand(1,8); ?>.jpeg” class=”nimbus_722_400 … Read more

Woocommerce image sizes missing from Appearance › Customize but not declared by theme

WooCommerce itself registers support for the default themes. For Twenty Fifteen it registers the following: add_theme_support( ‘wc-product-gallery-zoom’ ); add_theme_support( ‘wc-product-gallery-lightbox’ ); add_theme_support( ‘wc-product-gallery-slider’ ); add_theme_support( ‘woocommerce’, array( ‘thumbnail_image_width’ => 200, ‘single_image_width’ => 350, ) ); This is why those settings are not in the Customiser. However, regardless of what theme support is registered, the gallery_thumbnail_image_width … Read more

download link for uploaded images for wordpress

You should just be able to use the HTML5 download attribute for that. So just make your links look like this: <a href=”https://wordpress.stackexchange.com/questions/331391/<?php echo wp_get_attachment_image_url($id); ?>” download>Download Image</a> where $id is the attachment ID

WordPress Featured Image meta box not showing

You might be facing this problem because your theme does not support featured images. But you can easily add that support, so no worries 🙂 To quote the WordPress Theme Handbook: Themes must declare support for the Featured Image function before the Featured Image interface will appear on the Edit screen. Support is declared by … Read more

Clear out old images, any advice?

I think you have already discovered the problem with a plugin approach. They will look for unlinked media (images not associated with a post) and remove those files. As you have said, you are using custom fields and you may also have uploaded images inside your post content. Sadly the only option I can think … Read more

trying to get wp_get_attachment_url to output clickable link

You’re onto the answer… The function, wp_get_attachment_url() (see Codex) just gives you the URL. You could wrap it in a link: echo ‘<tr><td><a href=”‘ . esc_attr(wp_get_attachment_url($row[‘item_code1’])) . ‘”>’ . esc_html($item_1_title) . ‘</a></td></tr>’; Alternately, you can use wp_get_attachment_link() (see Codex) as you mentioned: echo wp_get_attachment_link($row[‘item_code1’], ‘medium’, false, false, esc_html($item_1_title)); Neither is specifically better all the time, … Read more

All Images not calling alt text

You’re not outputting any attributes besides the src and class. Try using the_post_thumbnail() instead. <?php the_post_thumbnail( ‘post-thumbnail’, array( ‘class’ => ‘img-responsive’ ) ); ?> This will include all attributes and supports responsive image markup by default.