Horje
display video on homepage - Wordpress Solution
[Solved] - display video on homepage - Wordpress Solution
Try following codes
searching for a way to display a video on the home page for the theme called "jungleland." currently, homepage images appear thru posts as a "featured image." i set the url to the image in the featured image box and they appear on the home page. but, if i set a url to a video, all i see on the home page is a small text link that says "featured." not sure what further info someone may need to get started with this question, but please let me know and i'll try to post it or send it to you. the theme is free to use. the link to the theme is: [[LINK href="http://www.themelab.com/2009/09/03/jungleland-free-wordpress-theme/"]] here.[[/LINK]] thank you.

Solution - 1

Well,the problem is happening because you try to show video throug img tag,but you can't do what you want in the way you do it. What video are you trying to show? I mean do you have flash player to show the video in or you just write the video url? Tell me how you trying to show the video and I'll give you a solution. Have a good day


Solution - 2

The featured image uses the tag. If you'd like to display a video instead, you would have to use the or tag. You'd need to modify line 35 of index.php and you could just replace
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><img src="<?php if(get_post_meta($post->ID, "image_value", $single = true) != "") { echo get_post_meta($post->ID, "image_value", $single = true); } else { ?><?php bloginfo('template_url'); ?>/images/img-featured.jpg<?php } ?>" alt="featured" width="350px" height="250px"/></a>
with
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><object type="application/x-shockwave-flash" width="350" height="250" data="<?php if(get_post_meta($post->ID, "image_value", $single = true) != "") { echo get_post_meta($post->ID, "image_value", $single = true); } else { ?><?php bloginfo('template_url'); ?>/images/img-featured.jpg<?php } ?>"><param name="movie" value="<?php if(get_post_meta($post->ID, "image_value", $single = true) != "") { echo get_post_meta($post->ID, "image_value", $single = true); } else { ?><?php bloginfo('template_url'); ?>/images/img-featured.jpg<?php } ?>" /><param name="wmode" value="transparent" /></object></a>

Date: 2022-10-21 05:22:55
Category: Wordpress
More for You