58 reputation
7
bio website
location London
age
visits member for 2 years, 3 months
seen yesterday

Nov
11
comment Getting a peer review for my new plugin?
@moraleida Google is your friend - gist.github.com/janfabry
Sep
3
comment WP_Options high
Ah sorry I missed that.
Aug
20
comment post__in not working with pre_get_posts, but post__not_in does work
Cheers, that's a nice method. I ended up using a different solution in the end. Could I see your code for assign_ids?
Aug
12
comment get_avatar() default image not working as of wp 3.5
This question helped me! Cheers, annoying how WordPress doesn't tell you it couldn't load it and just changes the URL seemingly at random
Aug
12
comment custom default avatar showing broken link
So if you use a custom avatar which results in a 404 link, WordPress tries to load one from gravatar.com? I only ask because I have a site behind a htaccess password at the moment and the custom gravatar is not loading, even though I've triple checked the URL (and tried get_stylesheet_directory_uri() and get_template_directory_uri() )
Jul
30
comment post__in not working with pre_get_posts, but post__not_in does work
I tried adding $query->set('ignore_sticky_posts', 1); but still no joy.
Jul
30
comment post__in not working with pre_get_posts, but post__not_in does work
I'm not sure, how would I check? This is a woocommerce product loop, so post_type=product
Jul
30
comment post__in not working with pre_get_posts, but post__not_in does work
I'm trying to filter the results of a query using pre_get_posts. Currently lots of results are returned, I'd like to only include those 3 post IDs (just for testing purposes, I have a much larger array of post IDS I'd like returned). At the moment I can exclude post IDs with post__not_in (this also works with the large array of IDS I have) but I can't include only them. I suppose another way would be to get an array of all post ids and compare that to the array I have?
Jul
29
comment using posts_where for meta data on pre_get_posts
The trouble is I can't keep manipulating query arguments, I think I need to further filter posts once I have done the first meta_query. But I don't know how to do this. E.g. first select all posts that have a value greater than 0 for _sale_price, then exclude those posts where the current time does not fall in between _sale_price_dates_from and _sale_price_dates_to. I don't think I can do this at the same time using multiple meta_query arrays.
Jul
8
comment Make a custom column sortable, by custom post count
Ah sorry this was me being silly, I added 'posts_per_page' => -1, to the query_posts call above and it works really well. Thanks again!
Jul
3
comment Make a custom column sortable, by custom post count
Hi thanks for answering. Unfortunately this doesn't work, although it seems like its nearly there. When I sort DESC the count of products seems to be limited to 10, i.e. the top user has 447 posts with post_type product, but it only displays 10. So it seems like its correctly ordered the user with the most, but isn't displaying the correct count. When I sort via ASC, the count is correct but the order is not. The results go like this: 1,1,2,2,0,2,0,0,2,0,0,0,1,4,0,1 etc so while small and correct, it still seems pretty random.
Jun
19
comment Can I upload media to a specific folder?
I'm experiencing the same problem at the moment. Did you ever find a good way of splitting up the folder after moving hosts, or did you just leave the existing 93k files as they are and turn on Organize Media?
Apr
11
comment How do I make a custom taxonomy for a CPT appear inbetween title and editor boxes?
Thanks, I couldn't get this to work in the end. But I used your if( $post->post_type != 'targeted-post-type' ) return; code to target my post type. I had to add global $post; above to get it to work though.
Apr
11
comment How do I make a custom taxonomy for a CPT appear inbetween title and editor boxes?
Thanks, that makes sense. They're just registered custom taxonomies. Is it easier to create them via add_meta_box in terms of setting priority? I would have done that, but I would like them to function as categories, not tags or standard meta input boxes.
Apr
10
comment How do I make a custom taxonomy for a CPT appear inbetween title and editor boxes?
Oh and also, this changes the meta boxes for every single post type. How do I target just one?
Apr
10
comment How do I make a custom taxonomy for a CPT appear inbetween title and editor boxes?
Thanks for this. I use a few custom meta boxes already though. How about if I just wanted that specific taxonomy meta box to be displayed there, and the rest in their usual order? I'm unsure how to target a specific one...
Mar
27
comment Setting a custom $query->query_vars['meta_key'] breaks the WordPress menu
Thanks a lot for the help. The previous developer has coded the templates in such a way that he uses a few queries for an A-Z feature, so I think I'll just stick with what is working for now and use pre_get_posts in future. I have used it before on another project, but that was modifying the main query to only use a custom post type. Anyway, thanks again for the help!
Mar
27
comment Setting a custom $query->query_vars['meta_key'] breaks the WordPress menu
I'd love to make it more efficient, but I don't see how its needlessly running an extra query if I can't get it to work using the functions.php method... The code I'm using is: 'if( isset($_GET['county']) ) { $args = array_merge($wp_query->query, array( 'orderby' => 'title', 'order' => 'asc', 'meta_query' => array( array( 'key' => 'venue_county', 'value' => $_GET['county'], 'compare' => '=' ) ) ));'
Mar
27
comment Setting a custom $query->query_vars['meta_key'] breaks the WordPress menu
It is a query used on an archive page of a custom post type.
Feb
7
comment How to export/import theme customizer settings?
Can I +1 this suggestion? This would be incredibly useful