hyggelig75 Posted March 22, 2014 Share Posted March 22, 2014 I try to put the description in the movies on the front page of the website but can not get this code line to work what's wrong ?? i am trying to put a description under the movies on my frontpage but i cant get i to work hvat is wrong the line i am using :<?php if ($this->video['description'] != ''): ?> <div class="video-container"> <h2 class="description"><?php echo e($this->video['description'] ); ?></h2> under the movie ther i playing it is working but wen i put the same line in her on the fronpage it is not working foreach ($this->videos as $video): ?> <div id="video-<?php echo $video['video_id']; ?>" class="video"> <a href="<?php echo RELATIVE_URL,'/',$video['video_id'],'/',$video['slug']; ?>/" title="<?php echo e($video['title']); ?>"> <img src="<?php echo THUMB_URL,'/',path($video['video_id']),'/',$video['thumb']; ?>.jpg" alt="<?php echo e($video['title']); ?>" id="preview-video-<?php echo $video['video_id'].'-'.$video['thumb'].'-'.$video['thumbs']; ?>" /><br /> <h5><?php echo e(VText::truncate_chars($video['title'], 50)); ?></h5> <?php if ($video['ext'] == 'mp4'): ?><img src="<?php echo TPL_REL; ?>/images/hd.png" class="watermark" alt="" /><?php endif; ?> <?php if ($video['premium'] == '1'): ?><span class="watermark transparent">Premium</span><?php endif; ?> </a> <span class="duration"><?php echo VDate::duration($video['duration']); ?></span> <div class="rating_bar"><div style="width:<?php echo round($video['rating']*20); ?>%"></div></div> <span class="timeline clear"><?php echo VDate::nice($video['add_time']); ?></span> <span class="views"><?php echo $video['total_views'],' '; if ($video['total_views'] == '1'): echo __('view'); else: echo __('views'); endif; ?></span><?php if ($this->video['description'] != ''): ?> <div class="video-container"> <h2 class="description"><?php echo e($this->video['description'] ); ?></h2> <div class="clear"></div> Quote Link to comment https://forums.phpfreaks.com/topic/287176-description/ Share on other sites More sharing options...
ginerjm Posted March 22, 2014 Share Posted March 22, 2014 Don't understand your issue. Please use code tags to post code and make it more readable. Quote Link to comment https://forums.phpfreaks.com/topic/287176-description/#findComment-1473542 Share on other sites More sharing options...
cyberRobot Posted March 24, 2014 Share Posted March 24, 2014 Try the following: <h2 class="description"><?php _e($this->video['description']); ?></h2> Note that I removed "echo" and added the underscore to match the example here: http://codex.wordpress.org/Function_Reference/_e Quote Link to comment https://forums.phpfreaks.com/topic/287176-description/#findComment-1473679 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.