javascript - Advanced Custom Field data not showing in Fancybox in Wordpress -


I'm using the Advanced Custom Fields plugin in Wordpress to output an image with the link (for this embed code Is also being used to add a custom video player) in posts on a store page. The output code for the custom field is placed in a diva that is hidden and then loaded in the faxbox when it is loaded. The watchlist link is clicked. The problem is, ACF material does not load when called into the fancybox, if I show the code outside the hidden divis it shows. I'm not sure where I went wrong code below!

Cheers,

  & lt; Article id = "post- & lt ;? php the_ID () ;? & gt;" & Lt ;? Php post_class (); ? & Gt; & Gt; & Lt; An id = "fancybox-button" href = "# fancybox-content" class = "clock session" title = "& lt ;? php the_title () ;? & gt;" & Gt; Clock & lt; / A & gt; & Lt; Div style = "display: none;" & Gt; & Lt; Div id = "fancybox-content" style = "width: 600px; height: 400px; overflow: hidden;" & Gt; & Lt; Img src = "& lt ;? php the_field ('upload_screenshot') ;? & gt;" /> & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Article & gt; & Lt; Script type = "text / javascript" & gt; ($ {$ (Document) {$ (document) .ready (function () {$ ("# fancybox-button"). Fancybox ({Help: {title: {type: 'inside', position: 'top'}}, In 'Infection': 'elastic', 'transit' ':' elastic ',});})}}) (); & Lt; / Script & gt;  

Understand that, each post needs to provide a unique ID, so FIC Href of the opening ID and claim ID of the box in the box and fixed it!

Cheers


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -