Partial img lazy load with WP 5.5

Whether or not the loading=”lazy” attribute will be added to images from these plugins depends entirely on how those plugins are outputting their images. As outlined in this blog post, WordPress 5.5 only adds the loading=”lazy” attribute automatically to the following images: images within post content (the_content) images within post excerpts (the_excerpt) images within text … Read more

Automatically Insert alt attribute above image has h2

I find the solution using this How to change the markup WordPress inserts for post images My final code is: add_filter( ‘image_send_to_editor’, ‘add_custom_data_attribute_send_to_editor’, 10, 8 ); function add_custom_data_attribute_send_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ){ if( $id > 0 ){ $post = get_post( $id ); $html = str_replace( “<img src”, “<h2>$alt</h2><img src”, $html … Read more

How can I automatically download all images from all imported posts, place them on my new host, and replace all the links

There are plugins that do this, e.g. Auto Upload Images (found in this article). I haven’t tried it myself to recommend it. You’re migrating from BlogEngine.NET. There is also an old BlogML importer plugin to migrate directly from BlogEngine.NET (which produces BlogML exports), but the copy in the main WordPress directory hasn’t been updated in … Read more

URL through custom field returning null

Refer ACF link : Link And use <?php echo get_field(‘aboutus_img’); ?> Choose option image url This example demonstrates how to display the selected image when using the Image URL return type. This return type allows us to efficiently display a basic image but prevents us from loading any extra data about the image. <?php if( … Read more