This file contains hidden or 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
add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10, 3 ); | |
function remove_thumbnail_dimensions( $html, $post_id, $post_image_id ) { | |
$html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html ); | |
return $html; | |
} |
This file contains hidden or 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 if (have_posts() ): query_posts('p=12'); // article ID | |
while (have_posts() ): the_post(); ?> | |
<?php the_title(); ?> <!--Title--> | |
<?php the_content(); ?> <!--Content--> | |
<?php the_post_thumbnail(array(500,500)); ?> <!--Image--> | |
<?php endwhile; endif; wp_reset_query(); ?> |