Wordpress Loop – Show an overlay with embedded video on click -
i working on wordpress theme http://archive.timrodenbroeker.de , want wp-loop following:
• ask: (advanced) custom field „videoembed“ filled? (i use advanced custom field plugin“) http://www.advancedcustomfields.com/
• if yes, create linked text „button“
• if „button“ clicked, switch „overlay“-div’s display-value „none“ „block“ , insert videoembed-code via ajax, placed in custom-field „videoembed“
well, that’s it, don’t know, how code that. need help. take on this? amazing! thank guys!!!
this should started in php, assuming content in videoembed field link video on youtube or vimeo:
$videoembed = get_post_meta(get_the_id(),'videoembed'); if( !empty($videoembed) ) { echo '<a href="'.$videoembed.'" class="lightbox">click me</a>'; }
to pop-up lightbox should use javascript. easiest way use plugin part, fancybox or prettyphoto
good luck!
Comments
Post a Comment