Hi again dinkar,
If I understand correctly, on wrong answer you want to automatically show an image directly underneath the selected wrong answer?
If so, this is not really possible without completely breaking the formatting and looking ugly (which would be a shame since your quizzes look so nice!).
Why not just add the image to the Extra text section where you already have your explainer? You can add images or even video to that section
tell me how to do but i want on every page automatically not doing manually .
The following code should get you close to what you need.
function hdq_dinkar9852_after_quiz_extra_text()
{
?>
<script>
function hdq_dinkar9852_after_quiz_extra_text() {
const content = <p><img src = "#####" alt = ""/>;
const extraText = document.getElementsByClassName("hdq_question_after_text");
for (let i = 0; i < extraText.length; i++) {
extraText[i].insertAdjacentHTML("beforeend", content);
}
}
hdq_dinkar9852_after_quiz_extra_text();
</script>
<?php
}
add_action("hdq_after", "hdq_dinkar9852_after_quiz_extra_text");
Add that to your theme’s functions.php file (make a backup first!).
What it does is runs a script that adds the image automatically to the end of each Extra Text section. Update the ##### in the line <code>const content =<p><img src = “#####” alt = “”/>; to the URL of the image you want to add, or replace it with whatever HTML you want.
It looks like this forum stripped out a character.
<p><img src = "#####" alt = ""/></p> is supposed to be wrapped/surrounded in `
Here is a better formatted version: https://pastes.io/6onbmhj5li