How to get taxonomy image in single.php?

ChatGPT answer worked: $categories = get_the_terms(get_the_ID(), ‘car-brand’); if ($categories && !is_wp_error($categories)) { // Assuming you have only one category per post, you can use the first one $category = $categories[0]; // Get the category image using ACF $category_image = get_field(‘am-brand-img’, $category); $size=”am-thumbnail”; $category_thumb = $category_image[‘sizes’][$size]; $category_country = get_field(‘am-brandcountry’, $category); $category_cimage = get_field(‘am-brandcimage’, $category); // Display … Read more

Grouping posts by 2 different taxonomies

After much searching, and lots of help here (thanks again, Sally CJ), this the code I ended up using. $category_terms = get_terms(array(‘taxonomy’ => ‘categories’)); $series_terms = get_terms(array(‘taxonomy’ => ‘series’)); $custom_post_type=”cpt”; foreach( $category_terms as $category_term ) { foreach ($series_terms as $series_term) { $args = array( ‘post_type’ => $custom_post_type, ‘showposts’ => ‘5000’, ‘meta_key’ => ‘available_date’, ‘tax_query’ => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)