• Resolved James

    (@jmdesignsolutions)


    Hi,

    Hopefully this hasn’t been asked before (I couldn’t find an answer to it anywhere). I’d like to use the plugin so that the trigger and expanded content are in a template file but they need to be separate to one another (which I believe is where the “roll your own” method comes into play?). Is this possible within a template file?

    If it helps the code I’d like within the expanded content is a bunch of advanced custom fields e.g.

    <div class="additional-image"><img src="<?php the_field('additonal_image_1'); ?>" alt="<?php the_title(); ?>" ></div>

    Hope that makes some sense?!

    Thanks in advance,

    James

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

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

    (@baden03)

    Should be super-easy. Take a look at this little tutorial on the roll-your-own method and let us know if you get stuck.

    Thread Starter James

    (@jmdesignsolutions)

    That’s great thanks, the only problem I have now is that it triggers all the expanding divs on the page. The page is a loop of custom posts and each post has it’s own trigger/expanded box. Is there any way to make it so that each trigger only expands it’s corresponding box?

    Thanks,

    James

    Thread Starter James

    (@jmdesignsolutions)

    Also I was wondering if it’s possible to change the trigger when it’s clicked so it says (for example) “OPEN” to expand the box and then “CLOSE” to close it again?

    Thread Starter James

    (@jmdesignsolutions)

    Ignore the second request, I’ve managed to figure it out using CSS and background images.

    Just need to work out how to stop all the boxes expanding at once now…

    Thread Starter James

    (@jmdesignsolutions)

    Don’t worry about it, figured out it was not having unique ID’s for everything. All sorted now.

    Thanks!

    James

    Plugin Author Baden

    (@baden03)

    Good job James! Wish all support issues had people that keep fighting behind them.
    Issue marked as resolved… with a bullet!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Roll Your Own Method Within Template Files’ is closed to new replies.