• Hello! This code is in the functions of the parent theme:

    /**
         *  Post Thumbnails
         */
        add_theme_support( 'post-thumbnails' );
        set_post_thumbnail_size( 800, 500, true );
        set_post_thumbnail_size( 75, 75, true );
        set_post_thumbnail_size( 330, 249, true );

    I would like to over-ride this in my child theme so that it does not happen. I would prefer NOT to alter the parent function.php so I don’t have to keep doing it whenever there’s an update.

    Does anyone know how to do this? Any help is appreciated!!

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter quelyn

    (@quelyn)

    I definitely set the Settings > Media all to 0’s, but there is still 330×249’s being created and I’m guessing it’s due to the code in functions.

    Anyone know how I can over-ride this?

    Where did you download this theme from? Placing the theme’s name in square brackets isn’t sufficient to ensure that the right people get to see this topic.

    Thread Starter quelyn

    (@quelyn)

    Well, I added the theme name because I saw other people did it. I figured my question was general enough that anyone who does theme development could possibly help.

    The root of the question is over-riding the parent theme’s function in a child theme function file.

    Should this question be somewhere else?

    Where did you download this theme from?

    Thread Starter quelyn

    (@quelyn)

    From themeforest. I have a thread on the support for the theme, however, it has not yielded any assistance.

    I know that I can remove the code from the parent themes function file, but I’m trying to avoid that.

    I’m sorry but if you are using a commercial theme, you need to seek support from the theme’s developer/vendor. We do not support commercial products here.

    Thread Starter quelyn

    (@quelyn)

    Ok, that’s fine, is there another place I should be posting on general theme development support?

    No. There is no other forum here that you could post on. The wordpress.org support forums are meant for the core application, themes and plugins that are distributed on wordpress.org. We do not support themes downloaded from elsewhere.

    Thread Starter quelyn

    (@quelyn)

    I see I thought that since this website hosts documentation on Child Theming and development that perhaps it would help support general Word Press development. Not other themes, but general concepts in building and developing on wordpress using themes. But ok.

    The problem is that we do not have any access to commercial themes, so your best option is to contact the developer of your theme.

    Thread Starter quelyn

    (@quelyn)

    So, this can be re-created on any theme. twentytwelve for instance.

    http://wordpress.org/support/topic/change-thumnail-size-in-twenty-twelve-child-theme?replies=12

    If the parent theme’s function file calls the wordpress function:
    http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size

    And one wants to over-ride that in a child theme’s function file, is that even possible? This isn’t even really a theme dependent question, to be honest.

    In the 2012 theme, the set_post_thumbnail() calls are all inside the twentytwelve_setup() function. Is this the same in your theme?

    Thread Starter quelyn

    (@quelyn)

    Yes,the function is titled differently, but it’s the same. there are other commands in there as well. I was reading that you could put something like “if function exists”, but for that method it sounded like you had to edit the parent function.php as well :\

    Yes,the function is titled differently, but it’s the same.

    The issue being, we cannot access or see that function and do not know if it is over-writable via a child theme. Please ask your theme’s developer about this. It really is not our place to keep theme vendors in business or deprive them of any income that they may derive from support services.

    Thread Starter quelyn

    (@quelyn)

    In the twenty twelve theme. If you had

    function twentytwelve_setup()
    {
            /**
         *  Post Thumbnails
         */
        add_theme_support( 'post-thumbnails' );
        set_post_thumbnail_size( 800, 500, true );
        set_post_thumbnail_size( 75, 75, true );
        set_post_thumbnail_size( 330, 249, true );
    
    }
    add_action( 'after_setup_theme', 'twentytwelve_setup' );

    And there were other calls in there besides thumbnail. Could one over-write that without editing parent function.php?

Viewing 15 replies - 1 through 15 (of 19 total)

The topic ‘[Theme:Hooray] Over-ride "Post Thumbnails"’ is closed to new replies.