• Hello,

    I have a little modification on the index template that works fine unit i switch to php5.

    the code:

    <?php $my_query = new WP_Query('cat=789&showposts=10'); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    ## Some html and echo
    <?php endwhile;?>
    
    <?php query_posts('cat=-789&showposts=10'); ?>
    <?php while ( have_posts() ) : the_post() ?>
    ## Some Html and echo
    <?php endwhile;?>

    The problem:
    The systen not change the content when i try to switch to older post. And it pick up some realy old post.

    The code work very well with php4 (4.4.7 i think) but not with php 5.2.6

Viewing 1 replies (of 1 total)
  • What if you add &orderby=date&order=DESC to your parameters?

    Sounds like a problem that was reported where MySQL upgrades by hosts caused the oldest posts to appear first.

Viewing 1 replies (of 1 total)
  • The topic ‘Loop Problem. Works in PHP4 not work in PHP5’ is closed to new replies.