1,890 reputation
11961
bio website
location
age
visits member for 3 years
seen Dec 6 at 17:46

Nov
24
comment Different 'posts_per_page' setting for first, and rest of the paginated pages?
@ChipBennett Okay, since I am wording the question wrongly, I'd like some advise on this. How do I ask questions where I do have a working code, but am not sure if I am doing it right? That'd be very, very helpful.
Nov
24
comment Different 'posts_per_page' setting for first, and rest of the paginated pages?
@s_ha_dum Okay. 1. So, is this all I need to do then? gist.github.com/anonymous/9e7716a006667a667432. If yes, should I delete the question, or would you like to make an answer explaining that the codex is wrong and there's no need to use the found_posts filter? 2. In that case, could you please tell me how I can ask questions where I do have a working code, but am not sure if I am doing it right? That'd be very, very helpful.
Nov
24
comment Different 'posts_per_page' setting for first, and rest of the paginated pages?
@s_ha_dum As suggested in your other answer, I've tried this: gist.github.com/anonymous/9e7716a006667a667432. It has a simpler logic and seems to work without a problem (hopefully). So does that mean the WordPress Codex doc is wrong? Don't I need to use the other function that hooks into the found_posts filter?
Nov
24
asked Different 'posts_per_page' setting for first, and rest of the paginated pages?
Nov
23
comment Using in 'category_name' in '$query->set();'?
Whoa! That tip did it! It's that I am setting the post type on this line: $query->set( 'post_type', array( 'post' ) );. Removing it from the function resolved the problem, while retaining all functionality. Thank you very much! If possible, please edit your answer to make note of this.
Nov
23
accepted Using in 'category_name' in '$query->set();'?
Nov
23
asked Using in 'category_name' in '$query->set();'?
Nov
22
comment Query set using tax_query with relation 'OR' modifies category object?
Did you take a look at this question? wordpress.stackexchange.com/q/124100/10691 -- I have more details in there. This problem with the function persists even with Twenty Thirteen.
Nov
22
comment Query set using tax_query with relation 'OR' modifies category object?
Now the error is gone, but the primary issue stated in the question still persists i.e. nothing's changed. :/
Nov
22
comment Query set using tax_query with relation 'OR' modifies category object?
I get this error when using array_unshift(): "Warning: array_unshift() expects parameter 1 to be array, null given in /var/www/.../functions.php on line ...". As stated at the end of my question, $tax_query = $query->get( 'tax_query' ); is returning empty, not an array as it should. This is weird, but it happens even the default Twenty Thirteen theme. And also please take a look at the related question added as a link in the question, or here: wordpress.stackexchange.com/q/124100/10691
Nov
22
revised Query set using tax_query with relation 'OR' modifies category object?
added 138 characters in body
Nov
22
revised When/why does '$query->get( 'tax_query' );' return empty?
[Edit removed during grace period]
Nov
22
revised When/why does '$query->get( 'tax_query' );' return empty?
added 739 characters in body
Nov
22
revised Query set using tax_query with relation 'OR' modifies category object?
added 118 characters in body
Nov
22
revised When/why does '$query->get( 'tax_query' );' return empty?
added 611 characters in body
Nov
22
revised Multisite Conditional (if blog_id?) in a page template?
added 2 characters in body
Nov
22
revised Multisite Conditional (if blog_id?) in a page template?
added 1521 characters in body
Nov
22
answered Multisite Conditional (if blog_id?) in a page template?
Nov
22
revised When/why does '$query->get( 'tax_query' );' return empty?
added 4 characters in body
Nov
22
revised When/why does '$query->get( 'tax_query' );' return empty?
added 1537 characters in body