WordPress.org

Ready to get started?Download WordPress

Forums

Sampression Lite
[resolved] Homepage loading of full featured image causing loading/speed problems (2 posts)

  1. hjmt
    Member
    Posted 1 year ago #

    Great Theme to start off with.

    I am getting page speed/loading problem from google. They are saying my images on the front page should be scaled. E.g sampression is loading my featured image on the front page and not a smaller featured image of it.

    This may not be sampressions fault though. Is anyone else having the same problem? Thanks.

  2. Sampression
    Member
    Theme Author

    Posted 1 year ago #

    Hi Hjmt,
    Currently we are loading same image on homepage and single page. You can use different image sizes on homepage and interior pages. For this do the following:

    • 1.
    • go to functions.php file on \wp-content\themes\sampression-lite\includes\

    • 2.
    • add the following line after line 61

      add_image_size( 'featured-thumbnail', 220);
    • 3.
    • Now go to loop.php on \wp-content\themes\sampression-lite\ on line 27 and replace

      <?php the_post_thumbnail( 'large','',true ); ?>

      with

      <?php the_post_thumbnail( 'featured-thumbnail','',true ); ?>
    • 4.
    • Go to single.php on \wp-content\themes\sampression-lite\ on line 29 and replace that line with the following code

      <?php the_post_thumbnail( 'featured' ); ?>

    Hope this helps.
    Thanks,
    Sampression Team

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic