Audio problem
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?
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.
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.
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?
Thank you Dylan. I am going to do that 🙂
Respond to thread
This thread has been closed / marked as resolved.
You can reply to this thread, but it might be better to start a new thread if you need help.
You can also upload images to imgur and paste the links here. Just make sure that your images don't include any sensitive information.
Submit