Wordpress - Thumbnails do not show when using an elegant themes theme

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.

If the thumbnails are 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 of wp-content/uploads.

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.

Was this answer helpful?

 Print this Article

Also Read

Display detailed information rather than a generic 500 error

If you are receiving the dreaded 500 error, you can follow the below temporary patches to display...

Wordpress error when updating plugins or upgrading

Wordpress since version 3.2 has been giving some clients issues, to resolve this problem, edit...

Wordpress - Migrating between sites, servers and folders.

Wordpress saves certain parameters in the database which need to be modified if you move your...

Wordpress - Stop your site from getting hacked

How to Stop Your WordPress Blog Getting Hacked Unbeknownst to most people who set up a...