Highlighted image

Latest Reply from Alice at 2014-03-05 02:14:59
Hi folks,
I want to remove highlighted image from the post only, when I insert an image as "detached image", this appears on post. I want that the image doesn´t appears on post.
So trying here myself unable to find the answer to that. I'll leave it here for those who have the same doubt can view.
Just comment out the following lines:

/* if (!is_single()){ ?><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>"> <?php }
the_post_thumbnail(
array($SMTheme->get( 'layout', 'imgwidth' ), $SMTheme->get( 'layout', 'imgheight' )),
array("class" => $SMTheme->get( 'layout','imgpos' ) . " featured_image")
); */
We can also suggest you the following solution:
replace the code:
if(has_post_thumbnail())  {
?><?php if (!is_single()) { ?><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_post_thumbnail(
array($SMTheme->get( 'layout', 'imgwidth' ), $SMTheme->get( 'layout', 'imgheight' )),
array("class" => $SMTheme->get( 'layout','imgpos' ) . " featured_image")
); ?></a><?php } else { ?>
<?php the_post_thumbnail(
array(278, 173),
array("class" => $SMTheme->get( 'layout','imgpos' ) . " featured_image")
); ?>
<?php }
}

with :
if(has_post_thumbnail())  {
?><?php if (!is_single()) { ?><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_post_thumbnail(
array($SMTheme->get( 'layout', 'imgwidth' ), $SMTheme->get( 'layout', 'imgheight' )),
array("class" => $SMTheme->get( 'layout','imgpos' ) . " featured_image")
); ?></a><?php }
}

In the file theloop.php of the theme. The code may change from theme to theme.

Leave a reply

Add codeAdd image