Support » Plugins » jQuery Collapse-O-Matic : page template query not working

  • Resolved Olly – OWMC


    first off i have close to no jquery experience.

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

    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(); ?>

    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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • i have created a test page here so you can see how i have it working:

    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.

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘jQuery Collapse-O-Matic : page template query not working’ is closed to new replies.