Filter to control featured image size output be genesis_do_post_image?

Community Forums Forums General Discussion Filter to control featured image size output be genesis_do_post_image?

This topic is: not resolved

This topic contains 1 reply, has 1 voice, and was last updated by  jb510 1 year, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23006

    jb510
    Participant
    Post count: 10

    Is there a filter to change the featured image size output by the genesi image functions?

    something so I can do

    add_image_size (‘cpt_thumb’, 275, 180, true );

    if ( ‘my_cpt’ == get_post_type()) {
    add_filter( ??? , ‘cpt_thumb’);
    }

    Seem like it SHOULD be there…  just can’t freaking find it.


    #23021

    jb510
    Participant
    Post count: 10

    Thanks to @GaryJ I figured this out.

    [php]<code>
    /**
    * jb_modify_post_image
    *
    * Changes featured image size for white paper
    */
    function jb_modify_post_image( $image_size ) {
    if ( ‘jb_whitepaper’ === get_post_type()) {
    $image_size = ‘jb_whitepaper_featured’;
    }
    return $image_size;
    }
    add_filter( ‘genesis_pre_get_option_image_size’, ‘jb_modify_post_image’ );
    </code>
    [/php]


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.