Tag Info

New answers tagged

0

If I am reading your code and description correctly, you can simplify that to: $taxonomy = 'delivery_option'; $do = get_the_terms($post->ID,$taxonomy); if (!empty($do) && !is_wp_error($do)) { $do = array_shift($do); // assuming a single value as per the description. $term = str_replace('-delivery','',$do->slug); ...



Top 50 recent answers are included