How is called this thumbnail slider feature
This is called a Carousel or Slideshow gallery
This is called a Carousel or Slideshow gallery
How to make product image inherit from category image
Thumbnail (featured image) and Media Library cleanup queries help needed
add_filter( ‘intermediate_image_sizes_advanced’, function ( $sizes ) { $allowed = [ ‘thumbnail’, ‘medium’, ‘large’, ‘medium_large’ ]; foreach ( $sizes as $name => $size ) { if ( ! in_array( $name, $allowed ) ) { unset( $sizes[ $name ] ); } } return $sizes; } ); I ended up setting an array with the crops I would … Read more
then check like that: $thumb_id = get_woocommerce_term_meta( $subcategory->term_id, ‘thumbnail_id’, true ); $term_img = wp_get_attachment_url( $thumb_id ); and check like this $meta = get_term_meta( $subcategory->term_id ); var_dump($meta); $thumb_id = $meta[‘thumbnail_id’][0]; $term_img = wp_get_attachment_url( $thumb_id ); and you also get like this $thumbnail_id = get_term_meta( $subcategory->term_id, ‘thumbnail_id’, true ); $image = wp_get_attachment_url( $thumbnail_id );
Try with uploading the bigger size image and then call it based on the requirement : the_post_thumbnail( ‘thumbnail’ ); // Thumbnail (150 x 150 hard cropped) the_post_thumbnail( ‘medium’ ); // Medium resolution (300 x 300 max height 300px) the_post_thumbnail( ‘medium_large’ ); // Medium Large (added in WP 4.4) resolution (768 x 0 infinite height) the_post_thumbnail( … Read more
I found an adequate solution. Generally, I used the save_post_{$post->post_type} hook which gave me a $post_ID and a $post object. I was just checking to see if there was a thumbnail and if is not there to add it. That is all. add_action( ‘save_post_book’, function ($post_ID, $post){ if ( get_post_meta($post_ID, ‘_thumbnail_id’, true) ) : return; … Read more
Just use the the_post_thumbnail() function. It creates the image tag, adds srcset for you, and supports native lazy loading: the_post_thumbnail( ‘medium’, [ ‘class’ => ‘productimage’ ] );
insert og image link in wordpress post
A nearly identical use case for your question is found in the WordPress documentation for the filter admin_post_thumbnail_html. A filter hooked to this will receive the HTML for the admin screen as $content. Modify and return this markup as you wish. function filter_featured_image_admin_text( $content, $post_id, $thumbnail_id ){ $help_text=”<p>” . __( ‘Please use an image that … Read more