Support » Fixing WordPress » The best way to style posts based on taxonomy?

  • Resolved dfwgreg

    (@dfwgreg)


    Hey everybody,
    This maybe a tricky question but what’s the best way to style a post based on the select taxonomy? I’m using this:

    <?php $value = get_post_meta($post->ID, 'breaking', true) ?>
    <?php if($value == 'on') { ?>
    <?php if ( get_objects_in_term( 14, 'brknews') ) { ?>
    test - <?php the_title();?>
    <?php } elseif ( get_objects_in_term( 12, 'brknews') ) { ?>
    test2 - <?php the_title();?>
    <?php } elseif ( get_objects_in_term( 13, 'brknews') ) { ?>
    test3 - <?php the_title();?>
    <?php } else { ?>
    none
    <?php } ?>
    <?php }?>
    <?php?>

    If I choose object 12 and 13, they still show up as test - title

    Any suggestions?

    Thanks,
    Gregory S.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘The best way to style posts based on taxonomy?’ is closed to new replies.