• The default aspect ratio for featured images in posts is 640:360. All of the photos I want to post are taller (relatively), and so the bottom of the photos is getting cut off. What should I change to adjust the aspect ratio of featured images?

Viewing 15 replies - 16 through 30 (of 33 total)
  • You must have a typo somewhere – how about pasting your code here.

    Okay…

    style.css:

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

    functions.php:

    <?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', 650, 825, true );
    
    }
    ?>

    With regard to the above, I don’t know what “Do theme setup on the ‘after_setup_theme’ hook” means. Perhaps I failed to do it?

    Your code is okay – I copied it into my test site and it creates a featured image 650 x 825.
    When I look at your site in Firebug, I can’t see hatch-child in evidence at all – you say you have chosen that theme in the dashboard? Also that hatch-child is in a folder called “hatch-child” in the themes folder – the same place as the “hatch” folder?

    stoatoffear,

    Thanks for helping with this! You were right, the hatch-child wasn’t being applied. It turns out WordPress wasn’t recognizing the css file for the stylesheet – I’m not sure why, but I suspect the file itself was saved in the wrong format.

    Any thoughts on how I could get 10 columns and 10 rows of smaller icons versus the present default?

    Also, is there a way to not use the featured image, but just embed an image in the post without the blank box above?

    see this example of embedded image:
    https://momphoto.com/1000faces/?p=80

    vs.

    featured image
    https://momphoto.com/1000faces/?p=74

    and for some reason this post shows no image:
    https://momphoto.com/1000faces/?p=77

    Any thoughts on how I could get 10 columns and 10 rows of smaller icons versus the present default?
    ON Settings > Reading you can select how many blog posts to show – sounds like you should select “100”.
    The other stuff I don’t know – I solved the featured image size issue and wanted to share my solution.

    Hi Stoatoffear,

    I know I’m just missing some basic info but I’m trying to create the child theme based on your above directions. I created it, but it’s only giving me these options under the sheets (i.e. no functions.php):

    Stylesheet
    (style.css)
    RTL Stylesheet
    (rtl.css)

    How do I create the functions.php?

    Don’t know what “under the sheets” means (in this context).
    You would be creating functions.php using your favourite text-editor (textWrangler, notepad etc) then probably you’d be aiming to insert that into your site folder (using your favourite FTP thingy – Filezilla?) it goes in wp-content>themes>hatch-child

    Thanks Stoatoffear. I guess I’m just incapable of this. I can’t get any text editors that either work with my version of Mac or they just don’t seem to work when I upload them with Filezilla and put into wp-content>themes>hatch-child. Meaning, when I go to my child theme, there is no functions.php loaded. I really don’t know what I’m doing and don’t know what else to do. Is this the only way to solve this issue without editing the Hatch functions.php?? I’ve created child themes with no problem before when I was using an old theme but I think that is when I was not using WordPress. I guess I’m just in over my head now.

    What version of Mac is it? I am using Textwrangler 4.0.1 on Mac OS 10.6.8
    Using Filezilla – You’re dragging the file functions.php from your desktop into the hatch-child folder on the remote server and it’s not then showing up there? Are you sure you’re connected to the server? Are you sure it’s the same server as your site is on?

    Yeah, textwrangler works with 10.6 or higher and I have 10.5.8. I tried using Mac notepad but it doesn’t save each “note” so tried exporting it but then it’s not doing that.

    The filezilla part I’m doing right but when I tried it first time I was mistakenly using the standard Mac TextEdit as the source of the functions.php file so that was the problem. Otherwise I have the file in the right folder but now just can’t seem to save the functions.php with an applicable text editor for my computer. At least one that is free.

    There must be some text editor you can use – google free text editors and your OS version and I think this will start working for you.

    Okay, so after trying about 7 different ones, I finally found one that worked! Thanks! I like the dimension size for portraits. I just have to make sure if it is larger than that dimension (single thumbnail), that I shrink the size or it will be cropped and not clear, correct?

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘[Theme: Hatch] Change default size of featured image in a post?’ is closed to new replies.