Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #1488062

    Hello everyone.
    We’re using your “Lifestyle Blog Demo” (https://kriesi.at/themes/enfold-lifestyle-blog/) for a project.
    On laptops, post image previews are visible.
    00
    On smartphones, they aren’t displayed, either in portrait or landscape mode.
    01
    02
    What could be the cause?

    #1488087

    Hey icarogioiosi,

    Thank you for the inquiry.

    The featured images of the posts in the demo are still visible on mobile view when we checked. Please create a test page and provide the page URL in the private field so we can review it.

    Best regards,
    Ismael

    #1488102

    Hi Ismael.
    The site isn’t online yet, so I created a user you can use to log in.
    You can find the details in the private field.
    Thanks!

    #1488127

    Hi,

    Thanks for that. Please try this in Quick CSS to display the featured image on mobile:

    
    @media only screen and (max-width: 767px) {
      .responsive #top #main .sidebar, .responsive .post_author_timeline, .responsive .template-blog .blog-meta {
        display: block;
      }
    }

    Best regards,
    Rikard

    #1488138

    Great Rikard, it works for me.
    Is there a way to move the image above the title and have the text fit the width of the screen? The text space is very limited.
    10b
    Is it possible to remove the dotted line that “connects” the images?
    10c
    Thanks for your time.

    #1488159

    Hi,

    The category page is blank when we checked, and no page is selected as the blog page in Enfold > Theme Options panel. Where can we find the blog page or the posts?

    View post on imgur.com

    Best regards,
    Ismael

    #1488252

    Hi Ismael, thanks for your time.
    You’ll find a link in the private field.

    #1488280

    Hi,

    Thank you for the inquiry.

    You can add this css code to move the featured image above the post content and adjust its width:

    
    @media only screen and (max-width: 768px) {
    
      /* Add your Mobile Styles here */
      .responsive .template-blog .blog-meta {
        display: block;
        float: none;
      }
    
      .responsive .template-blog .post .entry-content-wrapper {
        overflow: hidden;
        float: none;
        width: 100%;
      }
    
      .responsive .template-blog .blog-meta,
      .responsive .template-blog .blog-meta a {
        width: 100%;
        min-height: 200px;
        margin-bottom: 20px;
      }
    
      .responsive .big-preview img,
      .responsive .small-preview img {
        object-fit: cover;
      }
    }

    Best regards,
    Ismael

    #1488312

    Hi Ismael.
    Thanks for your reply.
    The images are indeed moved above the title, but they are blurry.
    The theme is probably using a small image, which is enlarged to full screen with the code provided, thus degrading the quality of the photos.
    Furthermore, in landscape view on a smartphone, the image origin is not the center but the top margin.
    And the CSS code provided does not resolve the dotted line issue.
    10c

    #1488334

    Hi,

    Thank you for the update.

    To increase the size of the thumbnail, please add this filter in the functions.php file:

    function avf_post_featured_image_link_mod( $image_link, array $current_post, $size ){
      $image_link = get_the_post_thumbnail( $current_post['the_id'], 'full' ); 
      return $image_link;
    }
    add_filter( 'avf_post_featured_image_link', 'avf_post_featured_image_link_mod', 10, 3 );

    Then, include this css code inside the css media query to remove the dotted line:

    .responsive #top #main .sidebar, .responsive .post_author_timeline, .responsive .template-blog .blog-meta {
        display: none;
    }

    Best regards,
    Ismael

    #1488420

    Hi Ismael.
    Thanks for your time.

    “To increase the size of the thumbnail, please add this filter in the functions.php file…” Unfortunately, I don’t see any differences from before, even by clearing the device cache.

    “Then, include this CSS code inside the CSS media query to remove the dotted line…” The dotted line does indeed disappear, but unfortunately, the images are no longer visible either.

    Regards.

    #1488477

    Hi,

    Where did you add the code? The Appearance > Theme File Editor is not accessible, so we are not able to edit the functions.php file. Please provide the FTP details in the private field so that we can test the modification further.

    Best regards,
    Ismael

    #1488622

    Hi Ismael, thanks for your support.

    Where did you add the code?

    In the child’s functions.php file, as you indicated.

    The Appearance > Theme File Editor is not accessible.

    This hosting provider doesn’t enable it automatically, but I made a change and it is now active, as shown in the image where the inserted code is also highlighted.
    20

    Regards.

    #1488643

    Hi,

    Thank you for the update.

    We actually removed the is_single conditional function from the avf_post_featured_image_link filter. Please update the code.

    https://kriesi.at/support/topic/post-preview-image-display-issue/#post-1488334

    View post on imgur.com

    Best regards,
    Ismael

    #1488684

    Hi Ismael.
    With this change, the problem seems to be solved on smartphones, but on desktop, the image display in the list goes from this correct one
    30

    to this incorrect one
    31

    What do I need to change in the code to make it apply only to mobile devices?

    The problem with the vertical dashed line also remains unchanged and is still visible.
    10c
    Thanks for your time.

    #1488701

    Hi,

    Since we adjusted the size of the thumbnail, the aspect ratio changed. To address that, please add this css code:

    .big-preview img, .small-preview img {
        object-fit: cover;
        height: 82px;
    }

    Please review the css code above to eliminate the dotted line and make the featured image full width on mobile view. You can also post the login details in the private field so we can check the modification.

    Best regards,
    Ismael

    #1489001

    Hi Ismael, thanks for your support.
    This latest code seems to have solved the problem on desktop, and the image display in the list is now correct.

    40

    Unfortunately, the list previews on smartphones are now incorrect.

    42

    And when you open the post on both desktop and smartphone, the image is reduced in height (probably to the 82px value indicated in the code).

    41

    Regarding the login details, I sent them on August 15th, but you’ll find them listed again in the private field because I think your direct access is essential.

    Regards.

    #1489042

    Hi,

    Thank you for the info.

    We adjusted the css in the Quick CSS field. Please make sure to purge the cache before checking the page.

    Screenshot-2025-09-08-at-12-12-35-PM

    Best regards,
    Ismael

    #1489065

    Hi Ismael.
    Thanks for your support.
    The previews in the lists actually seem correct, both on desktop and smartphone.
    However, the problem when opening the post on desktop seems unchanged.
    41

    On smartphone, however, there is now a huge space between the photo and the post title, both in portrait and landscape view.
    51

    Regards.

    #1489068

    Hi everyone.
    To save time, I did some testing on my own.

    The code Ismael suggested

    .big-preview img, .small-preview img {
    object-fit: cover;
    height: 82px;
    }

    I changed it to the following:

    .big-preview img, .small-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    }

    And this solved the issues with the fixed 82px height in posts.

    The following is the remaining code (changed from the one Ismael proposed on August 20th) that seems to fix the issues I reported today regarding what was displayed when opening posts on both devices.

    @media only screen and (max-width: 768px) { 
    
    .responsive .template-blog .blog-meta { 
    display: block; 
    float: none; 
    } 
    
    .responsive .template-blog .post .entry-content-wrapper { 
    overflow: hidden; 
    float: none; 
    width: 100%; 
    } 
    
    .responsive .template-blog .blog-meta, 
    .responsive .template-blog .blog-meta a { 
    width: 100%; 
    height: auto !important; /* follows natural pitch */ 
    min-height: unset !important; 
    display: block; 
    overflow: hidden; 
    } 
    
    .responsive .big-preview img, 
    .responsive .small-preview img { 
    width: 100%; 
    height: auto; /* maintain aspect ratio */
    object-fit: contain; /* do not crop, display entire image */
    display: block;
    }
    
    .big-preview img, .small-preview img {
    width: 100%;
    height: auto; /* maintain aspect ratio */
    object-fit: contain; /* do not crop, display entire image */
    display: block;
    }
    }

    Since I’m not an expert on CSS, I’m wondering if you see any obvious errors.
    If not, this solves my problem for now.

    #1489074

    Hi,

    Great! The css code looks correct and valid. Please feel free to open another thread if you have any more questions.

    Have a nice day.

    Best regards,
    Ismael

Viewing 21 posts - 1 through 21 (of 21 total)
  • The topic ‘Post preview image display issue’ is closed to new replies.