1,799 reputation
11556
bio website
location
age
visits member for 2 years, 8 months
seen 22 hours ago

Jun
18
comment Has anyone used the wordpress plugin w3-total-cache on a Dreamhost VPS successfully?
Hmm... weird. I am no longer using W3 Total Cache for minification though. I am doing file concatenation using Apache: github.com/h5bp/server-configs-apache/blob/master/src/…
Jun
18
comment Has anyone used the wordpress plugin w3-total-cache on a Dreamhost VPS successfully?
@NickNo As stated in the answer, it'd be a false positive.
Dec
27
comment Should 'setup_postdata()' be reset with 'wp_reset_postdata()'?
@tf Why not make it an answer?
Dec
13
comment How can I forward just my homepage but not internal pages?
See if this helps: wordpress.stackexchange.com/a/121312/10691
Dec
3
comment How to wrap an element around an iframe or embed in content automatically?
If I am not wrong, for the filter to work, the last line should be: add_filter( 'embed_oembed_html', 'wrap_embed_with_div', 10, 4 );
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
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
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
comment Query set using tax_query with relation 'OR' modifies category object?
Posts that belong to the current category archive page's term OR the 'intl' category are being shown. But it appears that the category object for the page is set to point to 'intl' category and NOT the category archive page's term. For instance, <?php single_cat_title(); ?> shows "International" instead of "UK" for UK's archive page.
Nov
21
comment Query set using tax_query with relation 'OR' modifies category object?
I thought it'd work. But it didn't change anything. Here's a var_dump in case you can see what's wrong: pastebin.com/PDTAJb14. And here's the full function (modified as per your instructions), just in case: gist.github.com/anonymous/31518bbee8aa1f50a243
Nov
21
comment Can I use $query->set() (in a pre_get_posts() hook) with a custom taxonomy in WP 3?
NOTE! AlxVallejo is wrong. $tax_query is not an object, $query is though (it's an instance of WP_Query): wordpress.stackexchange.com/questions/35196/…
Nov
21
comment Query set using tax_query with relation 'OR' modifies category object?
@Milo Did that. Couldn't figure anything from it by myself: pastebin.com/PDTAJb14
Nov
21
comment When to use 'get_category_by_path' vs. 'get_term_by' to get category object from `get_query_var( 'category_name' )`?
Actually, get_category_by_slug uses get_term_by not get_category_by_path, or am I missing something? (github.com/WordPress/WordPress/blob/master/wp-includes/…)
Nov
12
comment Show a 404 error page if Public query variable's value doesn't exist?
Yes, I have. (Makes sense; but I haven't tested it yet -- have to get back home.) Thanks a lot! :)
Nov
12
comment is_archive() doesn't work on public query var archive pages?
No. Like I said earlier, in a way, is_archive() includes is_category(), is_tag, etc. -- all archives. But it's not working in my case.
Nov
12
comment is_archive() doesn't work on public query var archive pages?
is_archive() returns true for category, tag, date, et al archives. So I don't understand the point of your answer.