SHARE
TWEET

Alan Williams

a guest Jul 5th, 2017 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. function elegant_enqueue_css() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); }
  4.  
  5. add_action( 'wp_enqueue_scripts', 'elegant_enqueue_css' );
  6.  
  7. function mycustom_featured_width( ) { return 320; /* Custom featured post image width */ }
  8. add_filter( 'et_pb_blog_image_width', 'mycustom_featured_width');
  9. function mycustom_featured_height( ) { return auto; /* Custom featured post image height */ }
  10. add_filter( 'et_pb_blog_image_height', 'mycustom_featured_height');
  11. function mycustom_featured_size( $image_sizes ) {
  12. $custom_size = mycustom_featured_width() . 'x' . mycustom_featured_height();
  13. $image_sizes[$custom_size] = 'et-pb-post-main-image-thumbnail';
  14. return $image_sizes;
  15. }
  16. add_filter( 'et_theme_image_sizes', 'mycustom_featured_size' );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top