0
votes
2answers
19 views

WordPress Screwing Up 'orderby' => 'meta_value_num' in 'pre_get_posts'

I have a bunch of _ai_price_int meta values set up as just numbers. This is how the table looks: meta_id, post_id, meta_key, meta_value 1309, 1111, _ai_price_int, 6550 1310, 1115, ...
0
votes
1answer
1k views

Help With issue on pre_get_posts filter in taxonomy

I create a function to filter the taxonomy query with this code add_action('pre_get_posts', 'custom_taxonomy_query'); $option_taxposts_per_page = get_option('tax_posts_per_page'); function ...
0
votes
1answer
698 views

Using a pre_get_posts filter to search for multiple strings on all meta values

Using a pre_get_posts filter to search a given string on all meta_values: $query->set('meta_value', 'first string'); debug: AND ( (CAST(wp_postmeta.meta_value AS CHAR) = 'first string') ) ...