WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Dynamic Content Gallery query_posts conflict... help! (2 posts)

  1. Olly - OWMC
    Member
    Posted 2 years ago #

    Hi, I've been making wp sites for a while and I've used this plugin a few times now.

    I set it up and placed this in my index.php file.

    <?php if( is_home() ) {
    dynamic_content_gallery();
    } ?>

    It was working fine, until i put some php in my footer template that calls a list of category posts like so:

    <?php query_posts('category_name=actualites&showposts=5'); ?>
    <?php while (have_posts()) : the_post(); ?>
     <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>  </li>
    <?php the_excerpt(); ?>
    <?php endwhile; ?>

    and

    <?php query_posts('category_name=evenements&showposts=5'); ?>
    <?php while (have_posts()) : the_post(); ?>
     <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>  </li>
    <?php the_excerpt(); ?>
    <?php endwhile; ?>

    The result was the gallery just dissapeared from site. A blank space where it once was.

    If I remove the above code it works fine.

    I have tried replacing the plugin with other sliders but I can't get any of the ones that should do the job to work.

    If I look at the page source in my browser I see this:

    <!-- DCG Info Message 19: Auto image selected. Image attachment found. -->

    So, I've been trying to work around this all day. Really hoping someone can fill me in on what I'm missing.

    The site I'm working on under construction so i've blocked access to it for now. If someone wants to look at the page in question, first please go here and sign in with username "test2" and password "wordpress". Once logged in you cqn see the pqge in question at http://gad-center.com/
    .

    If I'm doing anything really stupid please let me know. Thanks in advance.

    [ Please do not bump. It's not permitted here. ]

  2. Olly - OWMC
    Member
    Posted 2 years ago #

    sorted. briefly, i used a different query in the footer:

    <?php $my_query = new WP_Query('category_name=evenementneuromusculaire1&posts_per_page=8'); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <a href="http://gad-center.com/neuromusculaire/programme-neuromusculaire/" title="Consulter le Programme Neuromusculaire"><li><?php the_title(); ?></a>
    <?php the_excerpt(); ?> <br></li>
    <?php endwhile; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic