Tax_query brake attachment size and srcset
-
Hello,
I’m have a post Query with tax_query, both are custom post type and cutom taxonomy.
And it looks like the tax_query brake the attachement size of the post.
My wp_get_attachment_image load in full size, and every time I remove my tax_query wp_get_attachment_image load as it should be.My post query
$query_args = array( 'post_type' => 'knowledge', 'posts_per_page' => 99, 'tax_query' => array( array( 'taxonomy' => 'knowledge_category', 'field' => 'term_id', 'terms' => 316, ), ), );
And my attachement is like this but I’m 99,99% sur there is no issue there as it work when I remove the tax_query part from my post query.
$post_thumbnail_id = get_post_thumbnail_id(); $title = get_the_title($post_thumbnail_id); echo wp_get_attachment_image( $post_thumbnail_id, 'small', false, array('title'=> $title, 'alt'=> $title, 'loading'=> 'lazy', ) );
Any idea from what it can come ?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Tax_query brake attachment size and srcset’ is closed to new replies.