Hello, Its been several days since I've been trying to make this happen: I'm making my own word press theme and all the layout is working fine but what's killing me is inserting inside my single.php a expandable div with an youtube video inside.
Im using the plugin jQuery Collapse-O-Matic to insert a expandable box inside my single.php using the following code:
<div class="z_trail">
<?php echo do_shortcode('[expand title="Youtube Video" " tag="Youtube" trigclass="arrowright" id="divyt" alt="Youtube"] --here-i-want-to-insert youtube [/expand]');?>
</div>
I also have a custom field in my post's with the youtube id of the videos i want to insert inside my expandable box. For that im using the following code:
<?php $youtubeid = get_post_meta($post->ID, "youtubeid", true); ?>
<?php if($youtubeid !== '') { ?>
<div class="video_style">
<object type="application/x-shockwave-flash" style="width:425px; height:350px;" data="http://www.youtube.com/v/<?php echo $youtubeid; ?>">
<param name="movie" value="http://www.youtube.com/v/<?php echo $youtubeid; ?>" />
</object>
</div>
<?php } ?>
Im not very good at coding so i will appreciate any help you guys can give me with this. Believe me Ive tried hundreds of different ways with no luck.
Thanks,