Hi, firstly, I absolutely love HD Quiz, it’s by far the b…

closed

Hi, firstly, I absolutely love HD Quiz, it’s by far the best and most versatile free quiz plugin I’ve found and I’ll be adding feedback to that effect in the WP App store.

I just have one small formatting issue that is annoying me – when I fill out Quiz Pass & Fail Text boxes, the Pass Text never has line spacing when the text is displayed after a quiz is finished, so it looks like a wall of text.

The Fail Text displays fine, every [enter] I add displays a line spacing and the text is easy to read with spacing.

I’ve looked at the text from Text and Visual perspectives, and both boxes are the same as far as I can see.

Has anyone else had this problem? Does this make sense?

Would love to resolve this issue as my passing text is always just a big wall of text.

Many thanks!

This thread has been imported from harmonicdesign.ca/hd-quiz/

December 8, 2022 at 7:00amPhil

Hi Phil,
the results text should absolutely be able to display multi-line content, so I think there is something about your page that is messing with this. Would you be able to send a link to a quiz so I can take a look?

08 December 2022 — 08:47support admin Dylan

Hi Dylan, sure, here is an example:

https://selfdevelopmentjourney.com/am-i-being-taken-advantage-of-at-work-quiz/

If you select all yes or first options, the result text is as I explained. But all no’s and it’s spaced properly.

I checked quickly on mobile and another browser just in case it was something like that, but it’s always the same.

Apprecaite you taking the time to help!

Hi Phil,
I just took a look and see the problem! Each of your sentences is wrapped inside of a span tag. I’m guessing you copy/pasted that content over from somewhere which kept the original sources formatting.

The easiest way to fix for you is to change the editor to the “text” edit tab. This will allow you to see the HTML that the editor has. From here you need to edit your span tags and change them p tags.

Example: <span>The quiz results .....</span> will change to <p>The quiz results .....</p>. This will undo the special formatting you have added.

Here is a screenshot if you need help finding that “text” tab:

View post on imgur.com

08 December 2022 — 10:29support admin Dylan

Hi Dylan

I had actually looked for formatting issues and didn’t see any, I happened to choose the only quiz I have where there are some issues as the example!

This formatting issue is happening on all my quizzes whether they have span or not. I removed the span tags on that post, and it still displays the same.

I looked through a couple of my other quizzes and they don’t have any span tags on pass or fail, yet they also appear as walls of text for the pass text and not for the fail text.

I’ll do my best to explain what I think is happening.

WordPress has a function called wpautop (wordpress auto p), that takes multiline content and wraps each section inside a paragraph p tag. This is how WordPress figures out to add a new paragraph when you press enter instead of having a single monolith paragraph with a bunch of brs in it.

This function is either broken, or more likely, simply not running for you. Some plugin or even a theme function probably has some logic where it assumes that each of your pages will only ever have one piece of “content” on it, and this disables it from running twice.

At this point, I think the easiest method for you is to do a super small edit to the plugin directly (let me know if you need help with this). If you edit ./hd-quiz/includes/functions.php on line 531 you will see the following:

UPDATE: Of course I can’t post PHP as a comment. It was dumb of me to try. Here is a pastebin of the code: https://controlc.com/0e2c41df

By default, the the_content filter passes through wpautop, but since something on your site is changing this behaviour, let’s edit that code to pass it ourselves. Change that above line to:

And the new code: https://controlc.com/4befdd85

08 December 2022 — 17:09support admin Dylan

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.