Support » Plugin: Q and A Focus Plus FAQ » Short code missing closing div

  • Resolved rcass


    Hey there I noticed when using the short codes that it was missing some closing divs.

    I created a patch I wanted you to be aware of it.

    Here is the link to the patch

    Hopefully there will be an official fix in the future.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author ELsMystERy



    Plugin Author ELsMystERy


    I looked at this and I do not see where any divs are actually missing. I did several things:

    1. Matched the divs up in the source code.

    2. Inspected the page and looked for any missing, or extra divs.

    3. Validated the HTML at

    Please tell me where the divs are that are missing closing tags because if closing tags were missing the entire WP template would get messed up.

    The divs are missing in shortcodes.php

    I had to add closing divs under line 271. This is what I added:

    $qafp_shortcode_output .= '</div></div>';

    I was having issues with my WP theme being messed up, when I matched divs up, I found the divs from the short code were not closed. So once I added the closing divs to the plugin everything worked as expected.

    Plugin Author ELsMystERy


    I know where you put the closing tags. What needs to be known is what divs those are actually closing because they might not actually be divs that are related to the plugin. I can’t just put closing divs in the middle of the code. I need to know exactly what divs need to be closed. When I diagnosed it all of the plugin’s divs were closed.

    Please investigate a little further and see if you can find the divs that need closing. You can remove the divs from the plugin and then run the page through the W3C HTML validator ( ) and it will tell you where the divs are that are not closed.

    My guess is it is more likely another plugin, or your theme causing a conflict. However, if you show me that there are divs that need closing in QAFP, I will fix it.

    I got the same problem if using shortcode with homelink=none. After investigating the code, I added the following line after line 271

    else $qafp_shortcode_output .= ‘</div>’;

    And everything works fine now.

    Plugin Author ELsMystERy


    Homelink=none will help me pinpoint this better. I will look into it.

    Plugin Author ELsMystERy


    OK… I see what was wrong and it will be fixed in the next update.

    Great! When will that be?

    Plugin Author ELsMystERy


    Probably later tonight, or very early tomorrow morning.

    Thanks! If the problem gets worked out soon, I’ll be able to use it on my current client’s site and also add it to my list of favourite plugins.

    Thanks! Sorry I didn’t reply previously with more code, I am glad you have a fix 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Short code missing closing div’ is closed to new replies.