Title: Short code missing closing div
Last modified: August 21, 2016

---

# Short code missing closing div

 *  Resolved [rcass](https://wordpress.org/support/users/rcass/)
 * (@rcass)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/)
 * 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](https://dl.dropboxusercontent.com/u/76900148/q-and-a-focus-plus-faq--inc-shortcodes--missing-div.patch)
 * Hopefully there will be an official fix in the future.

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [ELsMystERy](https://wordpress.org/support/users/elsmystery/)
 * (@elsmystery)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724534)
 * EDITED… SEE POST BELOW.
 *  Plugin Author [ELsMystERy](https://wordpress.org/support/users/elsmystery/)
 * (@elsmystery)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724535)
 * 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 w3.org.
 * 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.
 *  Thread Starter [rcass](https://wordpress.org/support/users/rcass/)
 * (@rcass)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724542)
 * 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](https://wordpress.org/support/users/elsmystery/)
 * (@elsmystery)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724543)
 * 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 ( [http://validator.w3.org/](http://validator.w3.org/))
   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.
 *  [hathhai](https://wordpress.org/support/users/hathhai/)
 * (@hathhai)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724564)
 * 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](https://wordpress.org/support/users/elsmystery/)
 * (@elsmystery)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724565)
 * Homelink=none will help me pinpoint this better. I will look into it.
 *  Plugin Author [ELsMystERy](https://wordpress.org/support/users/elsmystery/)
 * (@elsmystery)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724566)
 * OK… I see what was wrong and it will be fixed in the next update.
 *  [bluepixeldesign](https://wordpress.org/support/users/bluepixeldesign/)
 * (@bluepixeldesign)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724567)
 * Great! When will that be?
 *  Plugin Author [ELsMystERy](https://wordpress.org/support/users/elsmystery/)
 * (@elsmystery)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724568)
 * Probably later tonight, or very early tomorrow morning.
 *  [bluepixeldesign](https://wordpress.org/support/users/bluepixeldesign/)
 * (@bluepixeldesign)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724569)
 * 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.
 *  Thread Starter [rcass](https://wordpress.org/support/users/rcass/)
 * (@rcass)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724570)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/q-and-a-focus-plus-faq_4f505d.svg)
 * [Q and A Focus Plus FAQ](https://wordpress.org/plugins/q-and-a-focus-plus-faq/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/q-and-a-focus-plus-faq/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/q-and-a-focus-plus-faq/)
 * [Active Topics](https://wordpress.org/support/plugin/q-and-a-focus-plus-faq/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/q-and-a-focus-plus-faq/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/q-and-a-focus-plus-faq/reviews/)

 * 11 replies
 * 4 participants
 * Last reply from: [rcass](https://wordpress.org/support/users/rcass/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/short-code-missing-closing-div/#post-4724570)
 * Status: resolved