Transfered live site to new server and images are not showing
Transfered live site to new server and images are not showing
Transfered live site to new server and images are not showing
How can I use multi Media Uploader in a plugin?
In case any poor soul runs in to something similar, I’ve found the problem: define(‘WP_DEBUG’, false); Running debug mode (as I do on all dev sites), was throwing a warning, but it was being returned in the ‘admin-ajax.php’ which was preventing the images from showing/uploading and returning the appropriate values etc. I cannot believe the … Read more
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.
Images on admin backend not showing up
Those new files are your original file resized. When you insert an image and pick ‘medium’ ‘thumbnail’ or ‘large’, they aren’t generated on the fly or pulled out of thin air. They’re created when you upload the image to save size. The reason you can’t see these in the media section is because the media … Read more
I finally found that it is caused from the PHP5.5 version, and it’s because of the deprecated function mysql_connect(). I’ve benn able to solve it by changing the file /wp-includes/wp-db.php (line 1142). $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags ); Change with: $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags ); This makes the … Read more
show/hide attachments
Maybe it can be solved at run-time. wp_get_attachment_image says: Returns an HTML image element representing an attachment file, if there is any, otherwise an empty string. So, if the post meta is set, but an empty string is given, we should delete the post meta. $default=”<img src=”” . get_stylesheet_directory_uri() . ‘/img/team-logo.png” />’; if ( get_post_meta( … Read more
Given this I can’t use post meta I suppose this is a typo (my emphasis) setting a global meta key/value on the image is not OK It’s either a post meta or a site option. To use it as site option, use this in attachments_fields_to_edit: $is_profile_image = get_option( ‘_is_profile_image’ ); $checked = isset( $is_profile_image[ $post->ID … Read more