WordPress 404 Images – Images not found after deleted from media
They are getting called in the Open Graph (OG) tags. Please check any plugin that is generating those or remove them if they are hard-coded.
They are getting called in the Open Graph (OG) tags. Please check any plugin that is generating those or remove them if they are hard-coded.
I believe you can use wp_get_attachment_image_attributes filter here like so: function custom_class( $attr ) { $attr[‘class’] = ‘custom-class’; return $attr; }); add_filter( ‘wp_get_attachment_image_attributes’, ‘custom_class’ );
This is a known issue in WordPress bellow v4.8 Please make sure that wp is up to date. In some cases it might be a caching issue, so try clearing your cache (or just test in a different browser). Let me know if that does it.
Just assign something to a variable and output that if(is_page(14) or is_page(16)) { $class_name=”bannerExp”; } if(is_page(18) or is_page(52) or is_page(22) or is_page(20)) { $class_name=”bannerD”; $somevariable=”test”; } if(is_page(27)) {$class_name=”bannerJ”;} if(is_page(25)) {$class_name=”bannerS”;} if(is_page(2)) {$class_name=”bannerH”;} <div class=”<?php echo($class_name);?>”> <?php (if $somevariable != ”) { echo $somevariable;} ?> That being said, this is a horrible way of doing things … Read more
You need to call wp_enqueue_media() else the wp object won’t have a media option. For example, go to WP Admin and pull up the JS console and type wp.media on the dashboard, it won’t work. Try again on the media page, and this time it will work. https://codex.wordpress.org/Javascript_Reference/wp.media To be able to use the JavaScript-API, … Read more
the_field() directly echoes the contents of a field. If you want to use the_field() , you should change the field output to url in acf settings panel (Where you created the field). If you however wish to play around with var_dump() and return a specific value from an object, you should use get_field(‘field_name’). So in … Read more
If you refer to the grey background around the images, removing this should help: .wp-caption { background: #eee; } Or you could switch it to transparent .wp-caption { background: transparent; }
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.
Your asking for command line solution, I don’t have one – but for PHP you can cycle through all posts, build an array of files, compare it to an array of the media library, find unused and delete. Cycle through Posts use get_posts() for pages andor posts, and build your foreach loop Extract Media From … Read more
CSS Approach: For a purely triangular corner in css, see this blog post Code a Simple Folded Corner Effect With CSS or this Folded Corner example on Codepen You can then add the rotated “Answer” text as an absolutely positioned div with the css transform: rotate property. However, if you absolutely have to the curled … Read more