Re change news

Latest Reply from TTBoS at 2017-05-24 15:04:34 Solution
Hi,

I would like to change the way a message appears on the home page, and more precisely it would look and work just like the this web http://eu.battle.net/heroes/en/blog/.

So that single news with a small picture and when we click on it will open up standard on the whole page with a large picture, like here http://eu.battle.net/heroes/pl/blog/20766466/bohaterska-b%C3%B3jka- week-19-May-2017-arena-% C5% 9Bwi% C4% 85tynna-18-05-2017

I try to do it myself but all the time something does not go out :/.
ok i find solution ;) but i get next problems:

what i need change in

<!-- ========== Post Featured Image ========== -->
<?php if ( has_post_thumbnail() ) { // if there is featured image for this post you may wrapper for it ?>

<?php the_post_thumbnail(
'post-thumbnail',
array( 'class' => 'featured_image', 'style' => smt_thumbnail_style() )
); ?>

<?php } ?>

to get this thumb only on single page (<?php if ( !is_single() ) : ?>)? and what need change to get on thumb <?php the_permalink(); ?> ?
Hi!

You are on the right way - use if clause
<?php if ( is_single() ) { ?>
. As for the link I don't know how to change this because the _post_thumbnail function returns the link. Perhaps, you need to find some other function for this purpose.
hehe for the solution is:

<?php if ( is_home() && has_post_thumbnail() ) { // if there is featured image for this post you may wrapper for it ?><?php if ( !is_page() ) ?><a href="<?php the_permalink(); ?>" title="<?php printf( smt_translate( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>">

and all work fine ;D.

Leave a reply

Add codeAdd image