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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -