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.

WP 3.2.1

I'm in a bit of a bind. I have to create some pagination for the blog, but I believe I'm running into the bug described here, and I don't have authorization to fiddle with the server's php.ini file.

So, I need to find a way to create pagination for the blog without having max_num_pages. Is that possible? I don't want to re-engineer the blog loop if I don't have to.

EDIT: max_num_pages isn't even in the list of query_vars when I print them with print_r($wp_query->query_vars);

EDIT 2: Similarly, found_posts isn't in $wp_query, either. If it helps, I'm using a modified version of Avia as the theme.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Try:

ini_set( 'mysql.trace_mode', 0 );

… in your functions.php.

Maybe an .htaccess entry …

php_value mysql.trace_mode 0

… works too. I haven’t tested it.

share|improve this answer
    
ini_set doesn't work. print_r($wp_query->max_num_pages) still prints 0. I don't have access to the .htaccess –  KevinM1 Jan 19 '12 at 12:18
    
.htaccess should be right in the root folder of your WP installation. You don't have access to that? –  Jared Jan 19 '12 at 13:12
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.