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

Wordpress - 8 Ways To Prevent Your Blog From Being Hacked

1. Backup This is the first step and the most important. Before you plan on making any...

Increasing upload_max_ filesize and post_max_size in joomla and wordpress etc

To edit the server default settings for wordpress and joomla requirements as well as other php...

Wordpress - Installing on our servers.

To install wordpress follow the 5 steps below : Step 1 - Enable PHP on your website Open the...

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...