Help With Custom Image and Text Widget
Help With Custom Image and Text Widget
Help With Custom Image and Text Widget
Add select input with pre defined classes to insert image screen?
You probably need $produkte[‘bild’][‘alt’] instead of $produkte[‘alt’].
If it’s still relevant, you can add a class to the product thumbnail the following way. function loop_product_custom_thumbnail() { echo the_post_thumbnail(‘thumbnail’, array(‘class’ => ‘your-class-name’)); } remove_action( ‘woocommerce_before_shop_loop_item_title’, ‘woocommerce_template_loop_product_thumbnail’, 10); add_action( ‘woocommerce_before_shop_loop_item_title’, ‘loop_product_custom_thumbnail’, 10 );
I’m afraid that your code doesn’t make much sense (especially the part with foreach loop…), but here’s how it can look like… $attachments = get_children( array( ‘numberposts’ => -1, ‘order’ => ‘ASC’, ‘post_mime_type’ => ‘image’, ‘post_parent’ => $posid, ‘post_type’ => ‘attachment’, ) ); // print image 0 if ( array_key_exists( 0, $attachments ) ) { … Read more
update_post_meta attachment_image_alt description for Gutenberg
If affordable i would rather switch to a lazyload technique without the need of width and height attributes on images over somehow hacking of the editors image output. This saves you maintenance problems that may occur in the future with Gutenberg Editor. i do made good experiences with this plugin https://appelsiini.net/projects/lazyload/ edit: i’m wrong with … Read more
I got an issue after i migrated a site
Retrieve an array of image URLs that belong to a gallery
CSS In Customize -> Additional CSS, add the following code: .clearflow { clear: both; } figure.alignleft { margin-right: 1rem; } Blocks Insert blocks in the following order: Image Paragraph … Paragraph Image Paragraph … Paragraph Select Image block, and on its toolbar, select Align left icon. In Advanced -> Additional CSS Class section, add clearflow … Read more