Trying to list custom categories in custom post type [closed]
Try this, you can’t just throw a conditional block inside an echo statement. If you really need to it has to be a shorthand if-else, but for visual purposes I have put the statement outside the loop: $taxonomy = ‘product-categories’; $tax_terms = get_terms( $taxonomy ); foreach($tax_terms as $tax_term) { $terms = apply_filters( ‘product-categories-images-get-terms’, ” ); … Read more