Skip to content

Instantly share code, notes, and snippets.

@SteveRyan-ASU
Last active June 30, 2018 07:20
Show Gist options
  • Save SteveRyan-ASU/e129e2f68e1867875a0c23597ac85a06 to your computer and use it in GitHub Desktop.
Save SteveRyan-ASU/e129e2f68e1867875a0c23597ac85a06 to your computer and use it in GitHub Desktop.
Recommended patch from ET to produce square featured images for blog module posts.
<?php
/**
* Plugin Name: ASU Divi - ET Patch, Square Featured Images for Blog Module
* Plugin URI: https://gist.github.com/SteveRyan-ASU/e129e2f68e1867875a0c23597ac85a06/edit
* Description: Recommended patch from ET to produce square featured images for blog module posts.
* Author: Steve Ryan, ASU Engineering
* Author URI: https://engineering.asu.edu
* Version: 0.1
*
*/
// Recommended patch from ET to produce square featured images for blog module posts.
add_filter( 'et_pb_blog_image_width', 'custom_image_width' );
function custom_image_width($width) {
return '400';
}
add_filter( 'et_pb_blog_image_height', 'custom_image_height' );
function custom_image_height($height) {
return '400';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment