Skip to content

Instantly share code, notes, and snippets.

View theStreets93's full-sized avatar

Matej Đaković theStreets93

View GitHub Profile
@theStreets93
theStreets93 / WP_thumbnail_placeholder.php
Last active November 10, 2015 10:46
Wordpress - thumbnail - if not set featured image get placeholder
<?php /* if no have thumbnail */
if ( has_post_thumbnail() ):
the_post_thumbnail('size', array('class' => 'yourClassForImage'));
else:
/* get your placeholder image */
endif;
?>
@theStreets93
theStreets93 / WP_thumbnail.php
Last active November 10, 2015 10:46
Wordpress - thumbnail - size and class
<?php the_post_thumbnail('size', array('class' => 'className')); ?>