Skip to content

Instantly share code, notes, and snippets.

@rocaiguina
Created April 14, 2020 16:07
Show Gist options
  • Save rocaiguina/224dbbbf140d2c192d5f182bad1bd84a to your computer and use it in GitHub Desktop.
Save rocaiguina/224dbbbf140d2c192d5f182bad1bd84a to your computer and use it in GitHub Desktop.
<?php
/**
* The template part for displaying content
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
?>
<div class="card-item">
<div class="card-img"><a href="<?php the_permalink();?>"><?php the_post_thumbnail('thumbnail');?></a></div>
<div class="card-content">
<h5>
<?php
$glue = '';
foreach (wp_get_post_terms(get_the_ID(), 'recetas_cat') as $category) {
echo $glue . $category->name;
$glue = ', ';
}
?>
</h5>
<h3><a href="<?php the_permalink();?>"><?php the_title();?></a></h3>
<p><?php echo excerpt(26); ?></p>
<div class="card-actions">
<a href="<?php the_permalink();?>">ver receta</a>
</div>
</div>
</div><!-- #post-<?php the_ID();?> -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment