• Resolved hcnubnoraa

    (@hcnubnoraa)


    I’d like to be able to publish a photo in a blog post but stop a thumbnail version of that published image appearing on my posts/home page, as it currently does.

    I’m using: WordPress 5.3.2 running F8 Lite theme.

    I’m not experienced with blog/website building. I have tried: setting the image sizes to zero, Hide Featured Image and Stop Generating Image Sizes plugins.

    A combination of these worked for one post but not since.

    I’ve also tried various bits of code (that I’ve seen suggested as being the answer) in the additional CSS customize function. They didn’t work.

    Nothing seems to stop those pesky thumbnails appearing.

    To be clear, I don’t want thumbnails appearing on my posts index page but I do want them to appear in various blog posts.

    Finally, I’m using Post Grid on a static home page – I can stop the thumbnails appearing there. The problem is on the automatic WordPress post pages.

    Penny for your thoughts.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • On the link you shared (https://aaronbunch.com.au/harvest/), is the image you are having trouble getting rid of at the top? https://3cd.co/YEudbwKX I’m not seeing any other images on the page or on the rest of the site, other than the one showing up at the top.

    Thread Starter hcnubnoraa

    (@hcnubnoraa)

    Hi Brian,

    Thanks for taking a look. An example of the problem can be seen in the category: photo stories. It’s the blog post titled: ‘Nervous wait for Qlders in bushfire zones’.

    I don’t want the thumbnail to appear on the posts index page. The thumbnails also stretch, which is problematic if I’m stuck with them.

    Fingers crossed you can help, thank you.

    Aaron.

    • This reply was modified 5 years, 2 months ago by hcnubnoraa.
    Thread Starter hcnubnoraa

    (@hcnubnoraa)

    Update: I figured out how to stop the thumbnails stretching on the posts lists page.
    Now to stop them appearing altogether!

    So, just to confirm, these are the photos you’re trying to get rid of?
    https://3cd.co/d5ueQAqr (screenshot) – found on this page: https://aaronbunch.com.au/harvest/?cat=12

    So here’s what I would suggest:

    1. If you are using a child theme, good for you! If not, create a child theme. Child Theme InstructionsSee below for more info on this.
    2. Within your child theme, you have the option to either:
    • Override archive.php and remove the line (around #29) that calls get_the_image. or
    • Within your child theme’s functions.php file, add the following code:
    
    add_filter( 'get_the_image', 'mychildtheme_disable_archive_image' );
    function mychildtheme_disable_archive_image( $image ) {
        if ( ! is_singular() ) {
            return false;
        }
        return $image;
    }
    

    I went ahead and tried this with the theme you’re using (F8-Lite) and it was more difficult than it should be due to some of the poorly written code in the theme (using get_stylesheet_directory where get_template_directory should have been used), so I went ahead and created the child theme for you. You can download it here: https://3cd.co/5zuJRrdA

    I would highly recommend testing this in a development or staging environment before applying these changes to your live site and/or definitely make a backup of your site (check out BackupBuddy if you don’t already have a backup solution) before you update anything. Changing themes (even to a child theme) sometimes causes issues with settings and widgets getting lost.

    It sucks that doing something so simple is so complicated, especially if you aren’t already using a child theme. Hope this was helpful! Let me know if you have any questions.

    Thread Starter hcnubnoraa

    (@hcnubnoraa)

    Brian, thank you so much for your time and expertise. I’ll give it a go and let you know what happens. I’ll mark this forum as resolved for now.

    Thank you again,

    Aaron.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Stop thumbnails appearing on posts page’ is closed to new replies.