WordPress.org

Ready to get started?Download WordPress

Forums

custom query page no longer works after update to 3.1 (4 posts)

  1. Ian
    Member
    Posted 3 years ago #

    I had made a page that exported a text list of post titles for every book in a category and of a certain post type. It worked fine and I even had it running in a widget with widget cache so it loaded super quick on the page. But now I just get a blank white page, not even an error message.

    http://www.tradereadingorder.com/dc-list/

    Here's the code:

    <?php
    /*
    Template Name: dc-list-template
    */
    ?>
    <?php
    get_header();
    ?>
    
    <div id="content">
    <div id="blog-loop">
    
    <h1>The DC Comics Quick List</h1>
    
    <p>This is a quick reference page that lists every DC bookshelf format release in reading order with simple text links.</p>
    
    <p>Included are trade paperbacks (tpb), hardcovers, original graphic novels, prestige format squarebound books, and even companion volumes!</p>
    
    <p>For the full reading order pages with thumbs and dynamic info, find a specific list from the right menu or <a href="http://www.tradereadingorder.com/list/comics/dc-comics-universe/">click here</a>.<p>
    
    <table width="100%"><tr><td class="home-featured-header"><a href="http://www.tradereadingorder.com/list/comics/dc-comics-universe/">The DC 
    
    Universe</a></td></tr>
    </table>
    <ol>
    
    <?php query_posts(array('category__not_in'=>array(2432,1692),'showposts'=>-1,'post_type'=>dc,'order'=>asc)); ?>
    
    <?php while (have_posts()) : the_post(); ?>
    
    <li class="my_collection" id="<?php the_title(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
    
    <?php endwhile;?>
    
    <?php rewind_posts(); ?>
    </ol>
    
    <table width="100%"><tr><td class="home-featured-header"><a href="http://www.tradereadingorder.com/list/comics/dc-comics-universe/">Unplaced 
    
    DC Books</a></td></tr>
    </table>
    <ol>
    
    <?php query_posts('post_type=dc&cat=1692&showposts=-1&order=asc'); ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <li class="my_collection" id="<?php echo $post->post_name;?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
    
    <?php endwhile;?>
    
    <?php rewind_posts(); ?>
    </ol>
    
    </div>
    </div>
    
    <?php get_footer(); ?>

    I can't figure out what's gone wrong. any ideas?

  2. Ian
    Member
    Posted 3 years ago #

    It seems to display something if I take out the post type stuff (but of course, then it displays the wrong stuff!) Maybe I'm doing the query wrong?

  3. Ian
    Member
    Posted 3 years ago #

    It seems to be a problem with the first query

    <?php query_posts(array('category__not_in'=>array(2432,1692),'showposts'=>-1,'post_type'=>dc,'order'=>asc)); ?>

  4. Ian
    Member
    Posted 3 years ago #

    ok, so we tried a lot of things and it seems to be something to do with the amount of posts. talking out the -1 or just limiting it to something like 50 works. but it used to work fine showing all 1700 posts (and about 3000 even on the other page!)

    any ideas what caused it to start timing out or messing up since the upgrade?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.