WPML : how to pick a featured image only once for different languages?
You’ll find the answer here : http://wpml.org/2011/05/new-plugin-wpml-media-translation/
You’ll find the answer here : http://wpml.org/2011/05/new-plugin-wpml-media-translation/
It sounds like your images are linking to the image file. When you upload images, try linking them to the attachment page instead, or look for a plugin that opens image links in a lightbox. Try both solutions and see which you prefer.
You can use add_image_size function to add new image size and can use wp_get_attachment_image to retrieve those custom size image.
One of the better approaches is to unregister WP’s default gallery shortcode function, and add your own customized replacement. WP engineer has a great post about it here. This also will let you fix that funky inline CSS that the default gallery adds to the page.
Turned out my “answer” was that I didn’t really understand “get_image_tag.” It only runs when you first insert an image. I was thinking that it ran every time the edit interface was loaded. From researching and talking with others, it seems the only way to get the metabox data onto existing images is some kind … Read more
Ok found a solution by using this in the loop if ($attachment->post_excerpt == ‘download’) { Where i have put “download” in the caption textfield. hmmm, what if i want to select an image with 2 or more different captions?
Just figured out this one– in the function that load the iframe, add this: if ( !empty($_POST) ) { $return = media_upload_form_handler(); if ( is_string($return) ) return $return; if ( is_array($return) ) $errors = $return; } Then, all the form data get saved as normal.
The WordPress “gallery” functionality partly depends on the attachment of the media to the post via the post_parent column. Specifying IDs in your shortcode allows you to include images in your gallery that aren’t necessarily “attached” to your post — that is to say, not uploaded from within your post or page. This flexibility allows … Read more
Try passing in the image into the functions themselves: <?php $previous_image = “<img src=”http://domain.com/path/to/image/” alt=”Previous Posts”>”; $next_image = “<img src=”http://domain.com/path/to/image/” alt=”Newer Posts”>”; ?> <span class=”nav-previous”><?php previous_image_link( false, $previous_image ); ?></span> <span class=”nav-next”><?php next_image_link( false, $next_image ); ?></span>
Use, wp_get_attachment_image_src( $attachment_id, $size); Specify the size parameter as follows; $size (string/array) (optional) Size of the image shown for an image attachment: either a string keyword (thumbnail, medium, large or full) or a 2-item array representing width and height in pixels, e.g. array(32,32). As of Version 2.5, this parameter does not affect the size of … Read more