Advertisement
towfiqi

Epione Video slider

Apr 16th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. Make sure you are using the Epione 1.4 version.
  2.  
  3. Go to Appearance> Editor and select front-page.php file and find this line:
  4.  
  5. <?php the_post_thumbnail(); ?>
  6.  
  7.  
  8. And replace it with:
  9.  
  10.  
  11. <?php
  12. $values = get_post_custom_values("video");
  13.  
  14. if ( $values ) { ?>
  15. <div style="margin-top:15px;"><?php echo $values[0]; ?></div>
  16. <?php }
  17. else {
  18. echo ''. the_post_thumbnail() . '';
  19. } ?>
  20.  
  21. then while editing the post, create a new custom field called "video". and in the value field paste the youtube embed code of your video, for example:
  22.  
  23. <object width="390" height="228"><param name="movie" value="http://www.youtube.com/v/ZJzkx1GsV5o?version=3&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ZJzkx1GsV5o?version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="390" height="228" allowscriptaccess="always" allowfullscreen="true"></embed></object>
  24.  
  25. Always choose the width of the video to 390px.
  26.  
  27. Update your post and the video will appear in the slider.
  28.  
  29. P.S: Here is how you add a custom field:
  30. http://www.youtube.com/watch?v=wzkcmESTa0g
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement