Show title when inserting single images

I am assuming you are using the WordPress editor tools to insert your single images. If so, you can just write title=”your title” into the markup or go to the visual tab, click the image, hit edit (the photograph icon), and enter a title. I don’t see a way to auto-fill the title, though there … Read more

Create a Link to Larger Image from within list of smaller images

Just use wp_get_attachment_image_src 2 times, to retrieve the 2 sizes: function display_images_in_list($size=”thumbnail”, $fullsize=”full”) { //.. previous function code is good … foreach($images as $image) { $th = wp_get_attachment_image_src($image->ID, $size); $full = wp_get_attachment_image_src($image->ID, $fullsize ); printf( ‘<a href=”https://wordpress.stackexchange.com/questions/114265/%s”><img src=”https://wordpress.stackexchange.com/questions/114265/%s” width=”%d” height=”%d” alt=”https://wordpress.stackexchange.com/questions/114265/%s” /></a>’, $full[0], $th[0], $th[1], $th[2], esc_attr( $image->post_title ) ); } } } the use … Read more

How to change default image rename?

I think you can only access $file and do something like below. add_filter(‘wp_handle_upload_prefilter’, ‘custom_upload_filter’ ); function custom_upload_filter( $file ){ $file[‘name’] = ‘wordpress-is-awesome-‘ . $file[‘name’]; return $file; } Also have a look how WP does it at wp-includes/file.php

How to add a credit line to a photo caption

I tried to do this once and almost got almost. Here’s what I did learn. Depending on your needs, this solution may be workable. You can append content to media when it’s inserted into the editor using the get_image_tag filter: /** * Filter to get caption and append image information to it. * * @return … Read more

Retrieving Image Storage path

Images (and all other attachments) are associated with a post in the posts table. The attachment source URL is saved in the guid column. That’s not a good choice, because sooner or later GUIDs won’t follow the URL scheme anymore, so don’t query that field directly.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)