Coding Question on statement if..else
-
Hi there.
I’m trying to set the featured images on the posts, and I want to combine them with the adsense leadin.I want to make it somehow if there is no featured image, to show up the adsense instead. So i did this:
if ( has_post_thumbnail() ) { the_post_thumbnail(); } else { if ($this->options['kill_inline']) $inline = '' ; else $inline = 'style="' . $show_leadin . ';margin:' . $margin . 'px;' . $border. '"' ; $leadin = stripslashes($this->options['info'] . "<!-- Post[count: " . $this->ezCount . "] -->\n" . '<div class="ezAdsense adsense adsense-leadin" ' . $inline . '>' . $this->options['text_leadin'] . ($this->urCount++ < $this->urMax ? $unreal : '') . "</div>\n" . $this->options['info'] . "\n") ; }
This code is working, but the problem is that the featured image appears on the top of the post, and is not alligned just like the adsense block.
Do I have to insert the thumbnail code of featured image anywhere else to take the place of the adsense block when it exists ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Coding Question on statement if..else’ is closed to new replies.