WooCommerce Variation Swatches and Photos – get attribute thumbnail

I resolved it by using get_woocommerce_term_meta $terms = get_terms( array( ‘taxonomy’ => ‘pa_texture’, ‘hide_empty’ => false, )); foreach ( $terms as $term ) : $thumbnail_id = get_woocommerce_term_meta( $term->term_id, ‘pa_texture_swatches_id_photo’, true ); $textureImg = wp_get_attachment_image_src( $thumbnail_id, ‘full’ ); ?> <img src=”https://wordpress.stackexchange.com/questions/274247/<?php echo $textureImg[0]; ?>”> endforeach;

Does WordPress have a way of changing the ‘Natural’ size of uploaded images?

WordPress has built in sizes for your photos that it automatically creates when you upland an image. You can call different ones by using get_the_post_thumbnail( $post_id, ‘thumbnail’ ); // Thumbnail (Note: different to Post Thumbnail) get_the_post_thumbnail( $post_id, ‘medium’ ); // Medium resolution get_the_post_thumbnail( $post_id, ‘large’ ); // Large resolution get_the_post_thumbnail( $post_id, ‘full’ ); // Original … Read more

thumbnail crop not working

There are 2 things in your case to consider: Your link contains s3.amazonaws.com… – this means that your site might be using a cdn. Are you completely sure that it is configureв and working as intended? I just reviewed my code and I don’t hook add_image_size inside functions.php to any action. Could you try to … Read more

WordPress can’t detect any thumbnails size?

Sounds like a plugin is interfering with the WordPress media features. If possible, try deactivating the media/image plugins and see if anything changes. You can also consider reinstalling the WordPress (wp-admin/update-core.php) It is recommended to back up your site before doing this.

New portfolio items appearing smaller on the grid

Are your source images all of the same size ? If you hover the src attribute for your images with the Chrome Developper Tools, it will tell you the natural size. For the smaller images, the natural size is: 292 x 190, 400×260. For the bigger images, the natural size is: 306×260 (all seem to … Read more

In the admin, how can you list thumbnails instead of titles for a custom post type?

I would look into adding a custom post column for that post type which shows the image you’d like to. See this link. edit: here’s a working example. function add_column_header_298736( $defaults ) { $defaults[ ‘image’ ] = ‘Image’; return $defaults; } add_filter( ‘manage_results_posts_columns’, ‘add_column_header_298736’, 20 ); function add_column_content_298736( $column_name, $post_id ) { if ( $column_name … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)