Upload .doc to blog

The better way would be to use Windows Live Writer. It’s a Microsoft product that’s part of the Windows Live Essentials suite. This program allows you to copy-paste content from a Word document, or just build the post out as you would in Word. But the advantage is that it can also talk directly to … Read more

Get image from post’s gallery

You can get the attached media to a post using get_children. IE: get the first attached image for post ID == 14 $args = array( ‘post_mime_type’ => ‘image’, ‘numberposts’ => 1, ‘post_parent’ => 14, ‘post_type’ => ‘attachment’ ); $first_attached_image = get_children( $args );

Image resize depending on orientation?

If you need the images to be the same width but varying heights (ie not 300 x 300 but 300 x anything) then in settings -> media add 9999 to the height of whichever image size you want to use. You can also define your own custom thumbnail using the same principle: http://codex.wordpress.org/Function_Reference/add_image_size [EDIT] As … Read more

media_sideload_image with rewritten urls?

You’re right, it’s because by default, wp_handle_sideload() requires a valid extension in the URI in order to continue processing the sideload. That is, unless your role has a capability called ‘unfiltered_upload‘, which by default is only given to admins. If it seems appropriate (and safe) for you to grant this capability to the user role … Read more

Show featured image next to post-teasers in Genesis Framework?

(Cut/pasted from the OP.) SOLUTION: As it turns out, this is very simple. Go to your Dashboard –> Genesis –> Theme Settings Now in the box labelled “Content Archives” select “Display Post Excerpts” from the drop down menu. Now make sure the “Include the Featured Image” box is checked and select your image size. Save … Read more

Echo URL of large version of Featured Image

Use the second parameter of wp_get_attachment_image_src(): $size. $att = wp_get_attachment_image_src( $att_ID, ‘large-thumb’ ); or $att = wp_get_attachment_image_src( $att_ID, array ( 900, 300 ) ); The size is passed to image_downsize() and there to image_get_intermediate_size(). If $size is an array WordPress will search for the best match in existing images: // from wp-includes/media.php::image_get_intermediate_size() // get the … Read more