Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Basically, I am little unaware of my WP can only run a query up to 766 custom post of one type (the actual posts).

I have 26,000 posts that are within one custom post type, but cannot query them all as it only allows me to query the first 766 and then stops on number 767.

Has anyone faced this problem before? If any idea on how it could be fixed?

EDIT:

From some of the comments I have debugged the website and found no errors to my query problem.I have used define('WP_DEBUG_DISPLAY', true); and got no where.

The public can be found here: http://universitycompare.com/test/

As you see here it is only showing 766 custom posts, but when it gets to 767 the query stops and does not work form there on. I need a way to set the Reading settings of 'Blog pages show at most' to unlimited. (or 30k+)

Also just FYI, the code i'm using to query can be found here:

<?php //wp_reset_query();  // Restore global post data stomped by the_post(). ?>

<?php 

// args
$args = array(
    'post_type' => 'uc_course',
    'order' => 'DESC'
);

// get results
$the_query = new WP_Query( $args );

// The Loop
?>
<?php if( $the_query->have_posts() ): ?>
    <ul>
    <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    <?php $object = get_field('university') ?>
        <?php if( $object->post_title == "University of Aberdeen" ) { ?>
        <li>
            <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
        </li>
        <?php } ?>
    <?php endwhile; ?>
    </ul>
<?php endif; ?>

<?php wp_reset_query();  // Restore global post data stomped by the_post(). ?>
share|improve this question
    
Types, not individual posts? Please elaborate how are you querying and how you came to 766 number. –  Rarst Aug 11 '13 at 14:29
    
Do you have debugging information? I am guessing you are looking at a memory problem or server timeout but without more information it is just a guess. –  s_ha_dum Aug 11 '13 at 14:47
    
@Rarst they are 26,000 of custom posts in one custom post type, but my query just stops. I get no error, it just stops at 767 and I cannot work out why. –  user1077369 Aug 11 '13 at 14:48
    
@s_ha_dum - I do really know my way around wordpress but I've never had a problem like this that has had to be debugged. How would I use a debug script to help me with my query problem. –  user1077369 Aug 11 '13 at 14:50
    
I'm guessing I could use: define('WP_DEBUG_DISPLAY', true); but where would this be placed? –  user1077369 Aug 11 '13 at 14:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.