[resolved] Extra and tags (5 posts)

  1. NFWRo
    Posted 3 years ago #

    Hi there
    I've just installed Collapse-O-Matic and it looks like it should do exactly what I want it to do. However, the source being output is automatically adding <p> and
    tags to the code round the expands.

    I've searched through Google and on these threads and found a number of responses, so here is what I've tried so far to no avail:
    I've tried adding the code to change the wpautop filter through my functions.php
    I am working constantly in the HTML and not the visual editor
    I've tried installing a pluging to remove extra <p> tags
    I've tried wrapping all my expands in a <div>
    I've tried wrapping all my expands in their own divs
    I've tried removing any spacing between the expands

    The last three just ended up putting the <p> and
    tags in different places - sometimes there were just </p> tags without opening ones.

    Please - can anyone help me? I'm using WP version 3.4.1 and have various plugins installed, but not anything like TinyMCE which controls formatting of pages and posts.

    I've put a test of the page here http://www.sylvaticus.com/test.html since I don't want to leave my live page incorrectly marked up.

    Thanks in advance


  2. Baden
    Plugin Author

    Posted 3 years ago #


    I feel your pain. It seems with every new release this WPautoP issue gets worse for shortcodes. So it sounds like you did your homework and must be frustrated to no end right about now. What we can recommend you try is the following:

    1. create a UL and give it a class. we like 'nimbledyflu'
    2. in your css, set up the class to not display the bullets:
      .nimbledyflu {
          list-style-type: none;
          padding-left: 0;
          margin-left: 0
    3. finally give your expand a tag attribute of li:
      <ul class="nimbledyflu">
      [expand title="Click Me" tag="li"]content goes here[/expand]

    Best of luck!
    P.S.: BLAAAAAAM you wpautop

  3. NFWRo
    Posted 3 years ago #

    Thank you so much for your quick and informative response. I too love the class nimbledyflu and may well use it in the future with your permission :-)

    I respond as one totally ashamed of myself and with great chagrin for wasting your time and sadly, a large part of my afternoon. I tried your method and when it didn't work, took just a slightly closer look at my code (not that I hadn't been through it quite a lot already). It was only then that I noticed that instead of [expand][/expand], I had gaily mistyped my first shortcodes as <expand></expand>, blithely copied and pasted it to the other content to be collapsed and then very carefully changed the attributes.

    I hang my head in shame and apologise fervently whilst firmly blaming fingers that use the less then and greater than keys far too often!

    Hopefully someone else with the same problem might read this and learn from my mistake. I truly hope they too haven't chucked two hours of their life down the drain.

    Thanks again *slinks back under stone*

  4. Baden
    Plugin Author

    Posted 3 years ago #

    Well then, well then... case closed!
    And, it seems, with somewhat of a greater than mastery of the English language at that.

  5. NFWRo
    Posted 3 years ago #

    With no sense of irony at all - LOL ;-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Collapse-O-Matic
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic