Last active
March 30, 2016 14:59
-
-
Save JeppeSigaard/7049cbb52b35082be18c369e05984d36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_image_size('alt-featured-size',752,350,true); // eller hvilke dimensioner du nu ønsker | |
add_filter('post_thumbnail_html',function($html, $post_id, $post_thumbnail_id, $size, $attr){ | |
if ( is_single() || is_singular() || is_page() ){ | |
$html = wp_get_attachment_image( $post_thumbnail_id, 'alt-featured-size', false, $attr ); | |
} | |
return $html; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment