Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #986514

    For Preview Image Size in Blog Posts setup, there are only 2 options:
    – Set size automatically
    – Choose size manually

    I don’t want any preview image to display so via CSS I do this:

    .home-business .slide-image {
    	display: none;
    }

    where home-business is a Custom CSS Class on a specific Blog Post element. This works and the preview image is not displayed.

    The issue is that the image itself is still being loaded on to the page and on the home page there are 5 Blog Posts with multiple posts each so I’m loading a bunch of images on the page for no reason. I’d like to stop the images loading at all.

    The best way would be for a new option on Preview Image Size of “Don’t load a preview image”. Can I submit that as a feature request?

    In the absence of such an option in the setup, is there a way, I guess via some code filter/segment in functions.php, to stop the preview images being loaded?

    #986637

    Hey zimbo,

    To remove featured images from all post page please try this code in your functions.php

    function wordpress_hide_feature_image( $html, $post_id, $post_image_id ) {
      return is_single() ? '' : $html;
    }
    // add the filter
    add_filter( 'post_thumbnail_html', 'wordpress_hide_feature_image', 10, 3);

    Best regards,
    Jordan Shannon

    #987361

    Hi,
    Doesn’t work: tried it on the dev/test site: http://dev.henleyherald.com – various Blog Posts on the home page e.g. under Business, Schools, Sport headings.

    I disabled file merging and compression, cleared cache.

    That aside, I’m guessing your code is attempting to remove all Preview Images site-wide wherever Blog Posts is used. That’s not really what I want – I’d like to be able to target specific instances of Blog Posts on certain pages. For instance this page – http://dev.henleyherald.com/news/ – uses Blog Posts and I’d still want to have the Preview Images display on that. Is this possible?

    PS. The best way would be for a new option on Preview Image Size of “Don’t load a preview image” – where can I log a new feature request? I thought there used to be a thread somewhere but can’t find it.

    #987527

    Hi,

    Here is the feature request queue:

    So just to be clear, you want to hide images based on categories?

    Best regards,
    Jordan Shannon

    #987817

    The Request Feature button on the Feature Request page does not work. Click it and nothing happens. Tried it in Chrome, Firefox and Edge. Can you look into this?

    re. hiding images based on categories: nothing so simple… :-)

    I’d like to be able to turn off the Preview Images on any specific instance of Blog Posts on a page.

    On the home page I have a heading ‘Business’ and Blog Posts is used to highlight the latest 2 posts of the Business category. I do not want Preview Images, so I set a Custom CSS class on that Blog Posts element of “home-business” and then use “.home-business .slide-image { display: none; }” to turn off the images (but the images are still loaded, which is what I want to stop – and there are 8 Blog Posts elements on the page, only 2 of which I want Preview Images to show on, so I’m loading, but not showing, 12 images I don’t need).

    But on the separate Business page I use Blog Posts to display every single post in the Business category, and here I do want the Preview Images to show. So you can’t use categories to turn off Preview Images unless you can target a specific page.

    #988861

    Hi,

    Unfortunately we have not a solution for that right now, that can help you except coding, which would require to hire someone to help you with it.

    Best regards,
    Basilis

    #989171

    OK, but what about the Request Feature button not working?

    #989663

    Hi zimbo,

    Sorry about that, it is not working at the moment. Our devs are working on it.

    Best regards,
    Victoria

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.