What I basically have now:

I have a portfolio gallery masonry grid (using JIG plugin) that queries my custom post_type.
For each post, clicking on the thumbnail will trigger a lightbox showing the photo.
JIG allows you to use many different lightbox versions (PrettyPhoto, JP Carousel, ColorBox , PhotoSwipe), The lightbox’s can be configured to display descriptions, captions, authors, dates & times, alt text, and a few more fields from within JIG itself.

The desired goal:

  1. In the lightbox, I want to display an audio player, and pulling its src from the current post shown just as if it were a title, alt text, or caption field.
  2. I’ve setup the frontend add new post form for it to accept a mp3 url which saves the url to the mp3 in “my_meta_field”…
  3. I use the shortcode which injects the url into the markup. Defaults to the current post, but can be configured to accept $parent_post, or any other variable.

Methods I’ve tried using to call the field from shortcode and standard methods.
[types field="my_meta_field"] or echo types_render_field( "my_meta_field", array("output" => "raw") or get_post_meta()

What’s the most straightforward, and simple way to get the code to pass through the lightbox’s query and display it inside of the lightbox container?

Read more here: Display meta-field mp3 and add to lightbox container on portfolio page


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , , ,

Wordpress related questions and answers: