WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Hatch theme: duplicate images at top of posts (17 posts)

  1. jimtron
    Member
    Posted 2 years ago #

    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.

  2. Amy_T
    Member
    Posted 2 years ago #

    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?

  3. jimtron
    Member
    Posted 2 years ago #

    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.

  4. jimtron
    Member
    Posted 2 years ago #

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

    http://demo.alienwp.com/hatch/christmas-closing/
    http://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' ) ); ?>

  5. Amy_T
    Member
    Posted 2 years ago #

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

  6. Amy_T
    Member
    Posted 2 years ago #

    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 - http://www.amytrodd.com/2012/03/28/poker-portraits/

    Also i noticed the link to documentation in your original post isn't linking...

    Thank you :)

  7. jimtron
    Member
    Posted 2 years ago #

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

  8. stoatoffear
    Member
    Posted 1 year ago #

    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 http://devpress.com
    * @license http://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 http://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.

  9. jimtron
    Member
    Posted 1 year ago #

    Thanks for the info!

  10. a4jp.com
    Member
    Posted 1 year ago #

    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 :)

  11. timcastelijn
    Member
    Posted 1 year ago #

    thanks stoatoffear.

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

    cheers, tim

  12. a4jp.com
    Member
    Posted 1 year ago #

    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.

  13. dominika lipniewska
    Member
    Posted 1 year ago #

    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!

  14. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  15. 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.

    http://en.forums.wordpress.com/

    WordPress.COM and WordPress.ORG are not the same thing.

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

    It's a common misunderstanding. ;)

  16. dominika lipniewska
    Member
    Posted 1 year ago #

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

  17. stoatoffear
    Member
    Posted 1 year ago #

    timcastelijn
    Is it too boring to put some static HTML into your theme template?

Topic Closed

This topic has been closed to new replies.

About this Topic