| bio | website | leho.kraav.com |
|---|---|---|
| location | Estonia | |
| age | 33 | |
| visits | member for | 1 year, 5 months |
| seen | 8 hours ago | |
| stats | profile views | 4 |
|
11h |
awarded | Talkative |
|
May 28 |
comment |
How do I safely force get_theme_mod() to use a defined get_option(“stylesheet”) value? Hmmm good thinking going a level higher with the pre_get_option filter, not sure why I didn't think of that (answer: past midnight!). I'll put together some example code and let's possibly edit the answer then if you like it. |
|
May 28 |
comment |
How do I safely force get_theme_mod() to use a defined get_option(“stylesheet”) value? I am not sure I follow. This looks like hardcoding a single value, while I would want to re-use the whole array. Looking at get_theme_mod(), I would rather expect some filter that lets me override $mods in get_theme_mods(). |
|
May 28 |
asked | How do I safely force get_theme_mod() to use a defined get_option(“stylesheet”) value? |
|
Apr 6 |
answered | Is it possible to disable caching of an option when using w3 total cache? |
|
Jan 26 |
comment |
group posts by taxonomy terms Cached with transients? |
|
Jan 26 |
revised |
Recommended way to drop a pending query (in pre_get_posts)? more accurate details about query nature |
|
Jan 26 |
comment |
Recommended way to drop a pending query (in pre_get_posts)? Thanks. Of course I would gladly do part of the work in pre_get_posts, but it's going to be the standard "group by taxonomy" archive page problem. I think it doesn't make much sense to split this query up into two places. As a matter of fact, it's not the main query I'm trying to stop, at all. It's a secondary query_posts() call. But I guess the problem remains the same at heart. |
|
Jan 26 |
awarded | Commentator |
|
Jan 26 |
comment |
Recommended way to drop a pending query (in pre_get_posts)? Probably not, there's a bunch of other necessary stuff going on in that action still. None of the least selecting the template etc. |
|
Jan 26 |
asked | Recommended way to drop a pending query (in pre_get_posts)? |
|
Jan 26 |
comment |
group posts by taxonomy terms Right, but how are you getting the result posts term_id-s right now? Solving that with a single query is the tricky part, isn't it. If you loop through posts and hit each one with get_the_terms(), I don't think it's cached at all at that point? |
|
Jan 26 |
awarded | Citizen Patrol |
|
Jan 26 |
comment |
Group WP_Query by category So what is the optimal approach @MaorBarazany? |
|
Jan 26 |
comment |
group posts by taxonomy terms lol working on the exact same thing tonight.. pre_get_posts part is easy, getting all the posts. But grouping them by header... I've yet to find a way to somehow inject a term ID field into each query result post object. |
|
Jan 25 |
comment |
get_query_var() not working in pre_get_posts I am also struggling with a similar situation. Some plugin is executing query_posts() but when that query hits my pre_get_posts action, global $wp_query and $q parameter are different. get_query_var check $wp_query and returns empty. Looking at query_posts() source, it unsets and re-sets $wp_query, so how can $wp_query stay something old in my action? |
|
Dec 1 |
answered | How do I get WooCommerce to automatically recreate pages? |
|
Nov 2 |
comment |
How to disable automatic excerpt generation *in admin*? Yes, {get_}the_excerpt filters actually do work in admin just as well. Codepress Admin Columns fetches the content with get_the_excerpt() so I had to add_filter that, instead of just "the_excerpt" |
|
Nov 2 |
accepted | How to disable automatic excerpt generation *in admin*? |
|
Nov 2 |
comment |
How to disable automatic excerpt generation *in admin*? No, I'm not writing column code. Problem is the same without any plugin, since Excerpt View is WordPress built-in feature. |