Support » Plugin: Collapse-O-Matic » [Plugin: jQuery Collapse-O-Matic] Space after first title

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Baden

    (@baden03)

    @whoiscraig: This issue has started popping up a lot lately. Basically what is happening is WordPress is inserting/closing p tags after the first expand element. If you could, please paste the code you are using, so we can duplicate this on your test setup.

    if it’s more than a few lines, feel free to send the code to: info(at)twinpictures (dot) de

    Sorry for your issues, but thanks for the feedback. Together we’ll get this issue figured out!

    If you mean what’s on the page, then its just this:

    <strong>TAXATION</strong>
    [expand title="Individuals"]A paragraph about individuals.[/expand]
    [expand title="Sole Traders"]A paragraph about sole traders.[/expand]
    [expand title="Partnerships"]A paragraph about partnerships.[/expand]
    [expand title="Companies"]A paragraph about companies.[/expand]
    [expand title="Trusts"]A paragraph about trusts.[/expand]
    [expand title="Self-Managed Super"]A paragraph about self-managed super.[/expand]
    [expand title="Funds"]A paragraph about funds.[/expand]
    [expand title="Rental Properties"]A paragraph about rental properties.[/expand]
    [expand title="Bas Preparations"]A paragraph about bas preparations.[/expand]

    Nothing special or unusual. I’m using a child of Twenty Eleven theme if that has anything to do with it.

    Plugin Author Baden

    (@baden03)

    @whoiscraig: There is something seriously wonky going on with the way WordPress is treating shortcodes with the wpautop function. The best solution we have found is to wrap your expands in a div like so:

    <strong>TAXATION</strong>
    <div>
    [expand title="Individuals"]A paragraph about individuals.[/expand]
    [expand title="Sole Traders"]A paragraph about sole traders.[/expand]
    [expand title="Partnerships"]A paragraph about partnerships.[/expand]
    </div>

    Thank you! I temporarily got around it by putting them all inside a UL but it was messy. The DIV solution works much better.

    Hello,

    I am still getting this issue.

    Even if I copy and paste the code above to test it.

    <strong>TAXATION</strong>
    <div>
    [expand title="Individuals"]A paragraph about individuals.[/expand]
    [expand title="Sole Traders"]A paragraph about sole traders.[/expand]
    [expand title="Partnerships"]A paragraph about partnerships.[/expand]
    </div>

    I’m getting this also- I’m getting extra space after each [expand] block.

    Same issue here, but the <div> trick worked.

    I am also getting the extra space after the first item, but In my case it also happens “randomly” and I have tried the div trick with no luck.

    Plugin Author Baden

    (@baden03)

    @dreamgrowers: link?

    I added the div but I am still getting the spacing
    http://66.147.244.109/~azconsum/areas-of-practice/

    I looked at the code and I can see a </br> after the heading and then a <p></p>.

    Any ideas how to remove this? Thanks

    Plugin Author Baden

    (@baden03)

    The blank space after the first expand is due to the default order in which WordPress processes content—wpautop (a WordPress core function that converts line breaks to p or br tags) is run before shortcodes are processed. If you are brave, and the above fix does not work, try changing the Execution Priority of wpautop by adding the following line to function.php:
    add_filter( 'the_content', 'wpautop',20 );

    Let us know if this works for you.

    It worked great, thanks! 🙂

    I had the same problem.

    The <div></div> didn’t seem to have any effect.

    I pasted the “add filter” code provided to the functions file of my child theme. This put a bit more space between the second through the last title and shrank the space after the first title so that the spacing became the same for all of them. Looks fine!

    Question: I suppose that this will work until I update the functions file in my child theme. Any ideas for alleviating me of the need to edit the code whenever this happens?

    thanks for your product and your help!

    SOLUTION:
    I found a solution that worked for me. I put all my content inside a div, gave it an id and then called the br element and gave it a display:none rule.

    Hope that fixes things for you.

    Here’s example code:

    <div id="menuspacefix">
    [expand rel="menu" id="soup"]
    some soup item
    [/expand]
    [expand rel="menu" id="salad"]
    some salad item
    [/expand]
    </div>
    div#menuspacefix br {display:none;}

    thanks competetowin!
    your workaround works!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Plugin: jQuery Collapse-O-Matic] Space after first title’ is closed to new replies.