Here is my code, notice near the bottom I have a comment that say what works ok and the code you wrote above I have put in, but it does not output anything at all.
Code:
<?php
global $post;
$loop = new WP_Query(array('post_type' => 'event', 'posts_per_page' => 5));
while ( $loop->have_posts() ) : $loop->the_post();
$custom = get_post_custom($post->ID);
$event_name = $custom["event_name"][0];
$event_date = $custom["event_date"][0];
$event_time = $custom["event_time"][0];
?>
<div id="event-container">
<div class="events">
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<p>Event Name : <?php echo $event_name; ?></p>
<p>Event Date : <?php echo $event_date; ?></p>
<p>Event Time : <?php echo $event_time; ?></p>
<?php
if( 'skills' == get_query_var( 'taxonomy' ) ) {
$skill = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
if( is_object( $skill ) ) {
echo "\n" . '<br />Skill: ' . $skill->name; # Does not show anything
}
}
?>
<?php echo get_the_term_list($post->id, 'Skills' ,'Skills: ', ', ',''); #works fine?>
<?php echo "<BR>"; ?>
<?php echo strip_tags( get_the_term_list( $post->ID, 'Skills', 'Skills: ', ', ', '' ) ); #works fine ?>