Fix | Thumbnails Not Working in a WordPress Theme From Elegant Themes

On some web hosts, thumbnails do not work if you use the latest version of a themes from Elegant Themes, or if you update your theme to the latest version.

If you see the source code of the page, you’ll either see the full absolute path of the image is used or no path is displayed at all.

This is a problem with web hosting environment and can be fixed easily. To fix this, first check if php GD is installed on your web server. If its not installed, then contact your web host and ask them to install it. This will solve the thumbnails issue.

If PHP GD library is installed on your web server, and thumbnails are still not visible, then login to your WordPress dashboard, and go to Settings > media, and make sure that the uploads path is set to default value.

If its set to some different value, then change it to wp-content/uploads.

wordpress media upload path Fix | Thumbnails Not Working in a WordPress Theme From Elegant Themes

If the thumbnails are still not visible, then go to Appearance > Editor in your WordPress dashboard, and select custom-functions.php file from right side to edit.

Find the following code in this file, and comment the marked lines,

if ( false !== get_option( 'et_images_temp_folder' ) ) return;
$uploads_dir = wp_upload_dir();
$destination_dir = ( false === $uploads_dir['error'] ) ? path_join( $uploads_dir['basedir'], 'et_temp' ) : null;
if ( ! wp_mkdir_p( $destination_dir ) ) update_option( 'et_images_temp_folder', '' );
else {
update_option( 'et_images_temp_folder', preg_replace( '#\/\/#', '/', $destination_dir ) );
update_option( 'et_schedule_clean_images_last_time', time() );
}

The edited code snippet will look like this,

#if ( false !== get_option( 'et_images_temp_folder' ) ) return;
$uploads_dir = wp_upload_dir();
$destination_dir = ( false === $uploads_dir['error'] ) ? path_join( $uploads_dir['basedir'], 'et_temp' ) : null;
#if ( ! wp_mkdir_p( $destination_dir ) ) update_option( 'et_images_temp_folder', '' );
#else {
update_option( 'et_images_temp_folder', preg_replace( '#\/\/#', '/', $destination_dir ) );
update_option( 'et_schedule_clean_images_last_time', time() );
#}

Now save this file and go to your homepage and reload the page. The thumbnails will now appear fine. Now go back to Appearance > Editor and roll back the changes you made above.

If you see an error message after editing the custom-functions.php file, then it means that you did not edit the file correctly. In this case, replace the file via FTP to fix the error and edit it again, correctly.

I hope that thumbnails will work fine on your site now. If they still don’t work, then contact me at Elegant Themes support forum with details.

share on twitter

Comments

  1. Gerrit says:

    Thanks, this fixed the thumbnail issues I had after upgrading to the eBusiness theme version 5.1.

  2. Dave says:

    Confirmed. Fixed thumbnails and slider images that had disappeared after migrating a site to a new domain name. Thank You!

  3. Kais72 says:

    Confirmed. Fixed thumbnail issue after uploading website from localhost to web server. Thanks!

Leave a Reply