This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

shortcodes for panels adding extra due to comment lines

  • Creator
    Topic
  • #21720
    vtheme
    Participant

    This may be in the wrong place to put this, but the shortcodes plugin support section seemed to direct people here.. my apologies if this is misplaced.

    Since the last upgrade, I am seeing an extra <p> in the panel-heading shortcodes.

    In looking into this, these 2 comments are being wrapped by a <p> and so it creates a larger panel box. Not only is it too large, but when you hover, the background color toggle doesn’t cover that last line.

    Using firebug I see:

    <p>
    <!-- .panel-heading (end) -->
    </p>

    AND
    <p>
    <!-- .panel-collapse (end) -->
    </p>

    If I omit the comments in the Bootstrap 3 section: <!-- .panel-heading (end) --> and <!-- .panel-collapse (end) -->
    the issue resolves.

    This is something I can manually do, but in future upgrades it would be nice to have this fixed.

    Just thought I’d pass this along.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #21721
    Jason Bobich
    Keymaster

    Hi,

    So, you’re talking about the toggle and accordion shortcodes? Are you wrapping it in the [raw] shortcode as it shows here in the docs?

    http://shortcodes.themeblvd.com/generator/tabs/

    Are you possibly using some other plugin on your site that messes with WordPress’s wpautop?

    I can’t reproduce what you’re describing. Here’s the output I get:

    #21723
    vtheme
    Participant

    Whoa – that did it!

    Not sure why I was able to use this without the [ raw] for so long, but I am glad it is back to normal – thank you!

    #21725
    vtheme
    Participant

    After a bit more research, there is one place in my site where a plugin will override this, but no worries because in all of the other placements of the shortcode this works fine.

    I will probably remove the comment lines until I get this worked out.

    Moving onward – thanks!

    #21728
    Jason Bobich
    Keymaster

    Whatever plugin you’re using is most likely not handling wpautop correctly. What you were describing in the opening is a common symptom of people messing with wpautop, without understanding the order of do_shortcode and wpautop on the_content.

    If you’re getting <p> around HTML comments… it means that the HTML markup outputted by the shortcode is being treated as content. This is only possible if wpautop is being run on the content after all the shortcodes have been processed… but this is now how WordPress works by default. WordPress runs wpautop on the content, then runs do_shortcode on the content. If you reverse this, everything goes haywire.

    #21731
    vtheme
    Participant

    ahh, that makes sense – thanks for taking the time to explain it.

    So I guess there is not much I can do if I continue to use the plugin…. but I will try to pass it on to the developer, maybe it is possible to change the sequence.

    Thanks again.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.