Open johnbillion opened 6 years ago
It doesn't work with WP native gallery. Shortcode return nothing!
It doesn't work with WP native gallery. Shortcode return nothing!
Hey, I'm also interested with this feature. Did u find a solution ?
Same here, with WP native gallery. Gallery stays empty or did not show last uploaded images. Any solution for that? Thx
Here it was a Problem mit Polylang. Polylang filtered for Languages, what results in not visible Images.
This solved it:
add_action('parse_query', function ($query) { if ($query->query['post_mime_type'] === 'image' && $query->query['post_type'] === 'attachment' && key_exists('tax_query', $query->query_vars)) { for ($i = 0; $i < count($query->query_vars['tax_query']); $i++) { if (key_exists($i, $query->query_vars['tax_query']) && key_exists('taxonomy', $query->query_vars['tax_query'][$i]) && $query->query_vars['tax_query'][$i]['taxonomy'] === 'language') { unset($query->query_vars['tax_query'][$i]); } } } }, PHP_INT_MAX);