function get_first_tag() { $posttags = get_the_tags(); $count = 0; if ($posttags) { foreach ($posttags as $tag) { $count++; if (1 == $count) { return $tag->name . ' '; } } } else { get_first_category_name(); } }
<figure class="small-12 medium-4 columns"> <div class="comp-post small-12 left rel" data-thumb="<?php echo $th; ?> "> <div class="post-content small-12 left rel"> <header class="abs small-12 text-center"> <h5 class="text-up no-margin"><a href="<?php echo get_first_category_link($post->ID); ?> " title="<?php echo get_first_category_name($post->ID); ?> "><?php echo get_first_category_name($post->ID); ?> </a></h5> </header> <article class="small-12 full-height left d-table"> <div class="d-table-cell small-12 text-center"> <h1 class="divide-20"> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "><?php the_title();