Broken Media Library
I’d moved the root of my site from /blog/ to / and not changed it in the general options. Everything seemed to work fine apart from the media library. Correcting the path solved the problem.
I’d moved the root of my site from /blog/ to / and not changed it in the general options. Everything seemed to work fine apart from the media library. Correcting the path solved the problem.
Editing Featured Image Display When Creating Post
The post object is already available when you are editing a post. if you need it just call global $post; There is also a handy little core function that does this for you, get_attached_media() // Get the images uploaded to the post $images = get_attached_media( ‘image’ );
Thickbox not displaying just the image, instead showing full page in lightbox
See the all uploaded images of a user as an admin
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
Set padding for all content except images and few more elements
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
You are only seeing the top of the image, because your background image is much larger than the size you have for #smoothup in the css: in style.css #smoothup {height: 40px; width: 90px;} The actual image is 122 x 105. You need either: 1: modify the css defining #smoothup to fit the size of the … Read more
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