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