I'm creating a new view with the wordpress Media post type. I am using a table (with headers) and I want to embed the audio files for each entry within the table. So it would ike this:
Title Embed etc.....
For some reason all the embeded audio files just appear on top of the table and I cannot figure out why. See attached screen shot and I cannot figure out how to insert the audio embeds into the table.
Also, I was wondering how I can get the URL for the audio file so I can create download links for each entry.
Can you please help?
Thanks
Hi, I'll be glad to take a look. To start, can you please copy + paste the contents of your View's Loop Editor panel here for me to review? If a Content Template is used in the View, please copy + paste the contents of that template as well.
Then, please temporarily switch to a default theme like Twenty Nineteen, deactivate all plugins except Toolset, and place this View in a Page to test again. Are the embeds appearing inside the table now?
I think it might be easier to give you access... Can you make this private please?
Sure, private reply fields are active now.
Which View, where can I see it on the front-end of the site?
It's kind of hard for me to see what's going on here because there's invalid HTML markup in the View's loop template. Starting with this line:
<td><a href="[audio src="[wpv-post-id name="attachment" raw="true"]" class="btn btn-btn btn-mini"><i class="fa fa-download"></i> MP3</td>
Notice there's no closing "a" tag, and there's only one closing square bracket. I'm not sure what you're trying to accomplish here, but this line needs some work.
Also, I'm not sure about the attachement shortcode. Is that supposed to be attachment? Maybe that's something I'm not familiar with, can you show me documentation for that shortcode?
You can safely delete anything you like there. This site isn't in production.
All I'm trying to do is: 1) embed the audio file (per media file) 2) provide a download link (per audio file).
L
It seems the main issue here was the use of a Content Template in the Loop. That was forcing a media player to be rendered inside the tr tag, but outside any of the td tags. Since that's invalid HTML, the players were all pushed up above the table by the browser. Once I moved all the contents of the Content Template into the main loop tags, it started behaving more like expected. The player is now nested inside the table in each row, and the MP3 link points to the audio file. Please check now and let me know it's not working as expected.
My issue is resolved now. Thank you!