Navigation überspringen

[Gelöst] Display issue with embeded Audio

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem: I'm using Views to display a list of posts. The posts have an audio file saved in a custom field. I would like to include the embedded media player in my View results, but it's showing up in the wrong place.

Solution: Check the HTML markup structure and confirm the player is inserted with valid structure.

This support ticket is created vor 5 Jahren, 8 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 9 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von larryL vor 5 Jahren, 7 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#1232965
Screenshot_2019-04-18 Media View CDM Intranet.png

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

#1233546

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?

#1233608

I think it might be easier to give you access... Can you make this private please?

#1233859

Sure, private reply fields are active now.

#1235298

Which View, where can I see it on the front-end of the site?

#1235867

Sorry,

Media Recording View

.../media-view/

#1235873

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?

#1236357

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

#1236659

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.

#1238351

My issue is resolved now. Thank you!