Hello Mav300, I do not know if this is very ortodox, but it works for me:
<?php
foreach((get_the_category()) as $category) {
if ($category->cat_name != 'cat_to_exclude') {
if ($category->cat_name != 'cat_to_exclude2') { echo '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> ';}
}
}
?>
I don’t know how to explain it… but it works on the last version of wordpress to exclude cat_to_exclude and cat_to_exclude2
After the first if a { start what will happen for this if… and in this happening there is another if and the happening for both of them, what is the echo, what will be print on the final document…
the structure is something like this:
foreach{
if{ if{happening}}
}
…i told you, so hard to explain it because i just understand the syntax…. somebody explaining this please?
good luck!!