• I love the Hatch theme, but am having a bit of a problem. I tried installing it on a blog that’s been in use for a few years. All works fine, except on each blog post page I get a duplicate photo.

    Mine is a photo blog, so each post has one or more images. On the posts with one image, I get a duplicate image at the top of the post, in a larger size. On posts with multiple images, same thing happens–at the top of the post page, I get one of the images duplicated at the top.

    I’m guessing this might have to do with featured images, which I haven’t really used before. In this case I haven’t set any featured images. I did read all of the documentation, including how to set featured images.

    If it helps, here’s the blog in question, although I don’t currently have Hatch active because of the duplicate problem.

    Suggestions would be appreciated.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Hi – I’m having the same problem. Did you get it resolved/an answer? From looking at your blog, it looks like a completely different layout. Have you changed themes?

    Thread Starter jimtron

    (@jimtron)

    The current theme is Blogum. I don’t want to activate hatch until I sort out the duplicate image issue. Haven’t figured it out yet.

    Thread Starter jimtron

    (@jimtron)

    After looking at the Hatch demo again, I guess this is how it’s designed, see these posts:

    https://demo.alienwp.com/hatch/christmas-closing/
    https://demo.alienwp.com/hatch/first-post/

    I did find code to snip that so far seems to work; from post.php I cut this code out:

    <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'single-thumbnail', 'link_to_post' => false, 'image_class' => 'featured', 'width' => 640, 'height' => 360, 'default_image' => get_template_directory_uri() . '/images/single_image_placeholder.png' ) ); ?>

    Sorry just saw this, thank you, ill give it a go ??

    Hey sorry to keep pestering you – I’m still having issues with setting my featured images. I understand you have to choose one photo as a featured image but how do you move it – at the moment it’s picking out the centre and chopping the head off! Look at this page for example – https://www.amytrodd.com/2012/03/28/poker-portraits/

    Also i noticed the link to documentation in your original post isn’t linking…

    Thank you ??

    Thread Starter jimtron

    (@jimtron)

    I’m no longer using the Hatch theme, sorry I don’t know the answer to your question (you’re trying to recrop, right?).

    Hi,
    This is what I did to stop Hatch cropping the featured image:
    First of all, I hear it’s bad to alter the theme code, so create a child theme. This is very easy. My child theme consists of a folder (in the themes folder) called hatch-child. Into hatch child I put a style.css file with:

    /*
    Theme Name: Hatch Child
    Description: Child theme for Hatch theme
    Author: stoatoffear
    Template: hatch
    */
    
    @import url("../hatch/style.css");

    Please bear in mind that the theme name “hatch” is case-sensitive.
    Next create a functions.php file in the hatch-child folder with the following:

    <?php
    
    /**
    * @package Hatch Child
    * @subpackage Functions
    * @version 0.1
    * @author DevPress
    * @link https://devpress.com
    * @license https://www.gnu.org/licenses/gpl-2.0.html
    */
    
    /* Do theme setup on the 'after_setup_theme' hook. */
    add_action( 'after_setup_theme', 'hatch_child_theme_setup', 11 );
    
    function hatch_child_theme_setup() {
    
        /* Get action/filter hook prefix. */
        $prefix = hybrid_get_prefix();
    
        /* Custom image sizes */
        remove_action( 'init', 'hatch_image_sizes' );
        add_action( 'init', 'mytheme_image_sizes' );
    
    }
    
    function mytheme_image_sizes() {
    
    	add_image_size( 'single-thumbnail', 640, 360 );
    
    }
    ?>

    Then activate the theme in your site and voila! You will have to re-insert any images that have been cropped, plus the header image will also need to be re-done.

    Check my site https://www.richardcalvert.com where you can see that the featured images are now not cropped.

    I am a newbie too, so be sure to point out any improvements! I haven’t noticed any problems yet though.

    Thread Starter jimtron

    (@jimtron)

    Thanks for the info!

    Can I just ask you both how you got your post text to show up on the left side of the main image? I just loaded this plugin and almost everything is perfect I just don’t know how to get the text next to the main image on the top page. Sorry for the simple question.

    The plugin instructions only link to a page saying you must pay 30 dollars to have all the plugins and become a member of some site.

    I would like to use this plugin as well and do the same as you ??

    thanks stoatoffear.

    Do you also know a way to link homepage thumbnails to a static url instead of a post?

    cheers, tim

    Linking an image to a static URL is actually really difficult in WordPress. WordPress still needs to be updated before it can do stuff like that properly yet. The media library can’t save the URL at the moment. I kind of have a gallery image linking to an external site, so I know it is possible but the whole WordPress gallery component should be updated. I’ve asked for that a few times but no one seems interested in adding links to external URLs yet. I hope they do something about it one day. Not just plugins but a real fix. I would love to use a theme like this with external URLs as well.

    Hello, I’ve just started a blog in Hatch theme and having a problem with two images showing in every post. Is there a way to change it?

    Here is the link:

    Thanks!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Hi Dominika Lipniewska,
    I’m sure someone will be able to help you, but you need to create your own thread.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Or we would help her if she was using a self-hosted WordPress.ORG software installation.

    Dominika? You have a WordPress.COM blog and for support of that you should post to the correct forum instead.

    https://en.forums.wordpress.com/

    WordPress.COM and www.remarpro.com are not the same thing.

    https://en.support.wordpress.com/com-vs-org/

    It’s a common misunderstanding. ??

    O, that makes sense:) My website is a wordpress too so got a bit confused! Thanks a lot!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Hatch theme: duplicate images at top of posts’ is closed to new replies.