WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] jQuery Collapse-O-Matic : page template query not working (4 posts)

  1. Olly - OWMC
    Member
    Posted 1 year ago #

    first off i have close to no jquery experience.

    i have a page template that queries posts from a category:

    http://gad-center.com/neuromusculaire/programme-neuromusculaire/

    the php query is this:

    <?php $my_query = new WP_Query('category_name=programmeneuromusculaire&showposts=10'); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <div id="eachpost">
    <?php the_title(); ?>
    <?php the_content(); ?>
    </div>

    i replaced the_title and the_content with this code (from a post here) in my page template

    <h4 class="collapseomatic  colomat-close" title="<?php the_title(); ?>" id="<?php the_ID(); ?>">
    <?php the_title(); ?></h4>
    <div class="content_collapse_wrapper">
    <div id="target-<?php the_ID(); ?>" class="collapseomatic_content ">
    <?php the_excerpt(); ?></div></div>

    i see the little arrow on the side but nothing happens when i click on it. maybe i have some jquery conflict?

    http://wordpress.org/extend/plugins/jquery-collapse-o-matic/

  2. Olly - OWMC
    Member
    Posted 1 year ago #

    i have created a test page here so you can see how i have it working: http://gad-center.com/test-page-title/

  3. Baden
    Member
    Posted 1 year ago #

    Hey Olly,

    We checked out your test page and something very strange is going on. We noticed that, while the collapse-o-matic css file IS being loaded, the actual .js file (the one that has all the jQuery goodness inside) is NOT being loaded.

    You might see if there is a wacky plugin conflict that is preventing the collapse-o-matic plugin from loading correctly. Alternatively, it could be something (also wacky) with your theme. Basically, the following is NOT being inserted automatically into your header:

    <script type='text/javascript' src='http://your_domain_name/wp-content/plugins/jquery-collapse-o-matic/collapse.js?ver=1.3.4'></script>

    Hope this gets you pointed in the right direction. If you get stuck--or figure it out--let us know.

  4. Olly - OWMC
    Member
    Posted 1 year ago #

    sweet, thanks baden! i have manually put the code in my page template and it works fine.

    later i will have a go at disabling plugins to see if there's a conflict there somewhere. the theme is a child of "developer friendly" Whiteboard.

    many thanks for your swift response.

Topic Closed

This topic has been closed to new replies.

About this Topic