Why doesn't this if statment work properly?
-
I made this statement to say if it has a custom field called cust_cats then to output the cust_cats field.
elseif ( is_single() && !is_attachment() && get_post_meta($wp_query->post->ID, cust_cat, true) ) { $cat = get_post_meta($post->ID,'cust_cat',true); echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); echo $currentBefore; the_title(); echo $currentAfter; } elseif ( is_single() && !is_attachment() && !get_post_meta($wp_query->post->ID, cust_cat, true) ) { $cat = get_the_category(); $cat = $cat[0]; echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); echo $currentBefore; the_title(); echo $currentAfter; }
For some reason it doesn’t work.. Any ideas? thanks in advance
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Why doesn't this if statment work properly?’ is closed to new replies.