wp_get_attachment_image_src
wp_get_attachment_image_src
wp_get_attachment_image_src
I coudn’t solve it with a plugin or plain SQL, see this other question. Instead I exported all the posts with Tools > Data export > WordPress and deleted the posts. Then I run this python script over the exported XML file and imported the update xml file again. Tadaa… import re p = re.compile(r’http://([^/]*)/getfile/files.posterous.com/([^/]*)/([^/]*)/([^/]*)’) … Read more
Image editor not working correctly
What you need to do is to compress the image. WordPress offers a filter to set the compression ratio. function my_jpg_compression($args) { return 75; } add_filter(‘jpeg_quality’, ‘my_jpg_compression’); NOTE: What you are returning is the compression ratio. 70-80% is manageable and you will not notice much reduced image quality. Also, after applying this filter only future … Read more
How to show post attachment image
Lots of attachments is causing slow load
Incomplete attachment page
This code might be what you’re after. This loops through page templates to grab the featured image. If you add it outside the loop in your page.php template (or index.php, depending on your theme), it should grab the pages’ featured image, not the posts’. <?php global $post; if ( isset($post) ) { //get the ancestors … Read more
Use the string function instead, and print it only if you get something: $previous = adjacent_image_link(true, ‘thumbnail’ ); if ( ! empty ( $previous ) ) print ‘before’ . $previous . ‘after’;
Why are my ‘medium’ images the wrong size