• Resolved criszero

    (@criszero)


    Really great plugin!

    Anyone know a way to make the excerpt text part of the link? Essentially I have a title (currently the trigger) and a subtitle underneath the title that are styled differently. Really I want them both to be clickable, or have a way to include 2 lines of text with different stylings in the expand title.

    Code I have so far is:
    [expand title="Major pharmaceutical" tag="h5" trigclass="noarrow" excerpt="3D Virtual Academy with eLearning course on a new drug" excerptclass="reduced"]

    Many thanks, Chris

    https://www.ads-software.com/extend/plugins/jquery-collapse-o-matic/

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

    (@baden03)

    If I understand you correctly, you want to have the trigger text contain two lines of text, each styled in a unique (and no doubt beautiful) way. There are two things you might try.

    1. Thing One—wrapping both in a div, and including the html in the title:

    [expand title="<h4>Major pharmaceutical</h4><h5>Totally better than Minor pharmaceutical</h5>" tag="div" trigclass="noarrow" excerpt="3D Virtual Academy with eLearning course on a new drug" excerptclass="reduced"]

    2. Thing Two—using the roll-your-own method (probably a cleaner solution overall. This thread has some great examples to get you started.

    Please let us know if you get this sussed out, or require more direction. We are happy to help!

    Thread Starter criszero

    (@criszero)

    Hi Baden,

    I had read that thread already – it looks great but I’m pretty clueless with PHP so that’ll have to wait till I have some proper time to have a play (I’m a bit up against it at the moment!).

    However I did get what I wanted working! I followed the ‘roll your own’ guidance near the bottom of the Collapse-O-Matic documentation and came up with the following (probably not very elegant but it looks great and works!):

    <div id="collpase1" class="collapseomatic">
    <h5>MY TITLE</h5>
    <p class="reduced">MY SUBTITLE</p>
    </div>
    <div id="target-collpase1" class="collapseomatic_content">
    MY HIDDEN CONTENT
    </div>

    Thanks for the help, Chris

    Plugin Author Baden

    (@baden03)

    ah ha! you mean you wanted a subtitle ‘excerpt’ that is not clickable under the trigger, between the trigger and target? Have you seen the Excerpt Attribute?

    Anyway, the roll-your-own method will be the most flexible for you… what you have there looks good!

    Thread Starter criszero

    (@criszero)

    The excerpt attribute is what I had at the start, but it wasn’t clickable. I wanted to EITHER use the excerpt attribute and make it clickable, OR not use the excerpt attribute and wrap a title and a subtitle in the trigger. The div did the trick!

    I do have another problem now though! I used the Rel Attribute Highlander Grouping as described in the documentation thus: <div id="collpase1" class="collapseomatic" rel="project-highlander">. It works fine on the published page, but after publishing WordPress just deletes every rel attribute from the HTML!!

    Any idea what on earth is going on with that?! (Sorry, it’s not really a Collapse-o-matic issue I know!)

    Plugin Author Baden

    (@baden03)

    are you using Visual editor, or HTML when you edit and publish your pages?

    Thread Starter criszero

    (@criszero)

    HTML – the Visual editor is another tab – I read somewhere that I should turn the Visual editor off altogether (I don’t really use it) but not sure how to do that!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: jQuery Collapse-O-Matic] make excerpt text part of the link?’ is closed to new replies.