Plugin Author
Baden
(@baden03)
Most likely you will want to roll-your-own collapse elements
Please read this thread for many ideas and examples on how this can be done: http://ww.wp.xz.cn/support/topic/plugin-jquery-collapse-o-matic-roll-your-own-elements-ideas
Thank you Baden for you help.
So far I’m using this:
<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- post title -->
<h2 class="front-small-header collapseomatic colomat-open" rel="neuro-highlander" id="<?php the_ID(); ?>"><?php the_title(); ?></h2>
<div id="target-<?php the_ID(); ?>" class="collapseomatic_content ">
<?php the_content(); ?>
</div>
</article>
<!-- /article -->
However, it’s only showing the titles, and all the content when clicked. Is there a way to have it show title+excerpt, and on click: title+excerpt+”the rest”?
Thanks.
Plugin Author
Baden
(@baden03)
Yes, it means that each article will need to have a excerpt. Here is some reading for you: http://codex.ww.wp.xz.cn/Function_Reference/the_excerpt
All together it would look like:
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="front-small-header collapseomatic colomat-open" rel="neuro-highlander" id="<?php the_ID(); ?>"><?php the_title(); ?></h2>
<p><?php the_excerpt(); ?></p>
<div id="target-<?php the_ID(); ?>" class="collapseomatic_content ">
<?php the_content(); ?>
</div>
</article>
Thanks for the support.
Sorry to be a pain in the ass… but I’m still not getting the desired result. I’m kind of back to where I started with the code you posted.
What I have right now is:
-Target title with arrow next to it
-Excerpt underneath
However… when the title is clicked, the entire content of the post is showed underneath the excerpt, so it gets repeated.
Am I doing something wrong?
Unfortunately I can’t post a link to the site since it’s local.
Thanks in advance
So I guess it would be something like… putting the excerpt in a div… that is hidden with jquery once you click the trigger? Is this possible?
Plugin Author
Baden
(@baden03)
Ah, you are NOT using the excerpt field but, like you said.
just a regular automatic excerpt character length
So what you want is a setup more like the following:
title (trigger)
first part of the post
rest of the post (target)
So before you deal with the collapse issue, you really need to figure out how to separate excerpt and content.
http://ww.wp.xz.cn/support/topic/separate-excerpt-and-content-in-singlephp?replies=3
But this is beyond the scope of collapse-o-matic. Once you have installed an excerpt plugin that works you should have no problem replacing:
<div id="target-<?php the_ID(); ?>" class="collapseomatic_content ">
<?php the_content(); ?>
</div>
with
<div id="target-<?php the_ID(); ?>" class="collapseomatic_content ">
//some magic that returns the content minus the excerpt
</div>
Good luck!
Thanks alot for your fast help and for a nice plugin. Will recommend.
Peace
@666ogge666, were you successful? I would like to accomplish basically the same thing.
Plugin Author
Baden
(@baden03)
@techdaddyk,
The issue is marked as resolved. If you are trying to accomplish the same thing, the solution has been provided. If you have an issue that you would like further assistance on, please start a new thread and we will be happy to help you resolve it.