ACF under category name in shop page [closed]

If i understand you correctly here you want to display some text under each of the category titles on your shop page. Instead of editing the template i would suggest using a hook. To do this you should move your code into functions.php.

The complete code would look something like this:

add_action('woocommerce_after_subcategory_title', 'wpse_add_custom_text_under_category_title', 10);

function wpse_add_custom_text_under_category_title($category) {
   $term_id = 'product_cat_'.$category->term_id;
   the_field('krotki_opis_kategorii', $term_id);
}

The reason why your code is not working is because when you run get_queried_object_id on the shop page it will return the id of the page and not the category. When you use the hook, the $category object will be passed in through the hook like in the code above.

Hope this was what you were looking for. I did not test this code but it should work.