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 - Enabling Email Sending and SMTP authentication.

To enable sending mail via wordpress, you need to download and install one of the below wordpress...

Wordpress error when updating plugins or upgrading

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

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

How to install Wordpress on our servers Step-By-Step

Download the file on how to Install wordpress on our servers File Download

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