Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save langlers/c08627e5b6c6942f432d908ca0f31d6e to your computer and use it in GitHub Desktop.
Save langlers/c08627e5b6c6942f432d908ca0f31d6e to your computer and use it in GitHub Desktop.
WordPress :: Divi Builder :: Fullwidth Portfolio Module :: Custom Thumbnail Size
<?php
/* DON'T copy the first line (above) if your functions.php already has it.
* ---------------------------------------------------------------------- */
function my_et_theme_image_sizes( $sizes ) {
$sizes['200x200'] = 'my-et-pb-portfolio-image';
return $sizes;
}
add_filter( 'et_theme_image_sizes', 'my_et_theme_image_sizes' );
function my_et_fullwidth_portfolio_thumbnail_sizes( $size ) {
return 200;
}
add_action( 'et_pb_portfolio_image_width', 'my_et_fullwidth_portfolio_thumbnail_sizes' );
add_action( 'et_pb_portfolio_image_width', 'my_et_fullwidth_portfolio_thumbnail_sizes' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment