acunmeswew
Member
Posted 11 months ago #
<?php
$width = "half";
if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) :
$id = get_post_thumbnail_id();
$ar = wp_get_attachment_image_src( $id , array(9999,9999) );
$theImageSrc = $ar[0];
global $blog_id;
if (isset($blog_id) && $blog_id > 0) {
$imageParts = explode('/files/', $theImageSrc);
if (isset($imageParts[1])) {
$theImageSrc = '/blogs.dir/' . $blog_id . '/files/' . $imageParts[1];
}
}
?>
<div class="imageholder">
" class="imageholder">
<?php echo "<img src='".URL."/timthumb.php src=".urlencode($theImageSrc)."&h=129&w=129zc=3' alt='postimage' />";
?>
I buy Premium theme but featured image does'n work , are this php right ? or incorect ?
To display the image in a loop!
<?php if( has_post_thumbnail() ) :?>
<div class="imageholder">
<?php ( get_post_thumbnail() ) :?>
</div>
<?php endif; ?>
Options:
<?php ( get_post_thumbnail( array(250,250) ) ) :?>
<?php ( get_post_thumbnail( 'thumbnail' ) ) :?>
<?php ( get_post_thumbnail( 'medium' ) ) :?>
<?php ( get_post_thumbnail( 'large' ) ) :?>
<?php ( get_post_thumbnail( 'post-thumbnail' ) ) :?>
HTH
David
acunmeswew
Member
Posted 11 months ago #
To display the image in a loop!
<?php if( has_post_thumbnail() ) :?>
<div class="imageholder">
<?php ( get_post_thumbnail() ) :?>
</div>
<?php endif; ?>
HTH
David
where i put that code ? sorry i'm newbie in this section
It would replace the script you posted above, if you are not sure, as you have a premium 'paid theme' you should really get support from the themes vendor, or use a service like people per hour where someone will bid and do the change for a small amount of $$.
This forum is for un-paid products that are released under the GPL licence.
Regards
David