Audio problem

closed

Hi, I am putting back my audio on my quizzes but here is how it appears in the quiz:

[/audio]

Text and not visual (it works in the preview when I upload the audio) Help please?

April 1, 2025 at 2:24amcarole

Hi carole,
this could mean a couple of things.

A) Your theme (or at least the pages that you are loading the quiz) is not including wordpress embeds (it looks like you are using a custom template to load quizzes? Make sure you are correctly loading the header and footer for your theme in the template)

B) I also see your pages are heavily cached. It’s possible that the default WordPress code that renders out the shortcode is not correctly loading. Try temporarily clearing your caches to see if the page can now rebuild with the needed WordPress files.

C) Make sure you are adding the audio embed to the correct area. I recall that you were using an old custom adddon I made for you with this, but it is no longer needed with HDQ2. Make sure you are adding the code to the “Before question content” section and see if that helps.

If the above fails, you can always consider installing a plugin specifically for playing audio. HD Quiz does not have any audio or video capabilities directly, and just uses the default WordPress embeds. I am not affiliated with the following, and have not testing myself, but this plugin looks like it should get the job done.

HTML5 Audio Player- Best WordPress Audio Player Plugin

01 April 2025 — 23:26support admin Dylan

Thanks. FYI, it works on this page: https://testyourfrench.com/quiz-conversation/
I did add the audio at the right place and I can see the visual on the admin interface.
I did purge the cache and no change. I still see the text only for the link I gave you and not the visual audio file 🙁 I am going to try on another quiz and I will keep you posted.

Hi Dylan, before I download another plugin, is it possible to find out why it works on one quiz the audio visual and not on the other ones?

Unfortunately, that’s not something I can answer for you, only provide insights. Long message incoming 🙂

WordPress’ audio and video embed uses a default shortcode that comes with WordPress. For audio, this is the audio shortcode that you can see the text of.

When the shortcode loads, it replaces the shortcode text with the actual embed, as well as loads some extra scripts for the embedded player (specifically wp-mediaelement).

Neither of the above is happening for you on that page. Furthermore, it IS happening on one of your other pages.

I believe there are only two ways for this to be possible.

The first is an encoding issue, where your site converts certain characters into their HTML safe counterpart. This would cause the shortcode to be “text” instead of an actual shortcode. But I can view the source of the rendered page and can confirm that this is not the issue in your case.

The second is that your site is failing to recognize and parse the shortcode. There is no way for me to know what would cause this on your site, especially since there is a variance from page to page.

However, as I mentioned before, my instinct for weird quirks like this is to always blame page caching. Your caching solution might be creating the static version of your site without the needed WordPress scripts to create the embeds. This combined with the fact you seem to be using SiteGround’s Page Cache (I cannot recommend using a different page caching solution more – SG has, in my opinion, the most annoying and problematic cache solution out there).

Steps you can take

I’m going to start by offering my opinion. Remove the SiteGround Speed Optimizer plugin and replace with WP Fastest Cache. I am in no way affiliated with that plugin, but from experience, I can recommend it. Even if this does not fix your issue, you’ll almost certainly end up with a better cache solution with less of a penchant for breaking things.

WP Fastest Cache

In the same vain as above, I’d like to remind you that SiteGround (your host) also forces page caching from the hosting side. I recommend clearing or even deactivating this as well, and just using the above plugin. Here is info on what the host-level cache is and how to clear it: https://world.siteground.com/kb/clear-site-cache/

Go to the HD Quiz settings page and disable the feature “Replace the_content filter for quizzes”. Clear your site caches after and see if this helps. Note that this feature being enabled is not the cause of the problem in any way, but I hope that the disabling of this feature will stop your current page cache from ignoring the shortcodes.

If still no dice, what happens if you add the same quiz to a new page? Do the embeds work now? What if you edit a quiz, delete the embed and add it in fresh?

02 April 2025 — 16:10support admin Dylan

Thank you Dylan. I am going to do that 🙂

Hello, I’ve done all of this and it works for one question (6) but not for the other two. I can’t explain why. I am going to reopen a ticket.

Hi again Carole,
are we talking about the same original quiz “Ask Me About Contemporary French Songs”?

I just took a look and can see the audio embedded on question 6 without issue.

If this is the correct quiz, then the issue is probably just a local cache issue (ie: your browser). Try clearing your browser cache (or even viewing the page in incognito mode) to verify.

29 May 2025 — 15:14support admin Dylan

Yes it works for question 6 but not 7 and 8.

Sorry about that! Apparently I need to take a reading comprehension quiz 😀

View post on imgur.com

I just took another look. Not sure if you’ve made changes since your response, but I see the audio even for questions 7 and 8. Question 7 actually displays it twice.

29 May 2025 — 23:06support admin Dylan

Ah strange. Thanks! I tried with incognito browser. I cleared my cache.And I still don’t see audio in question 7 et 8. You got 8 working as well? If so, I need to find the solution on my side.

This thread has either been marked as complete or has been automatically closed due to inactivity. Please consider opening a new support thread for help.