<?php
/**
 * Template part for displaying posts from category "agenda"
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Xarxaprod_theme
 * @used by template-parts/content-post.php
 * @shown in : archive category
 *
 */

?>
      <article id="post-<?php the_ID(); ?>" <?php post_class('xarxaprod-card-each'); ?> >
         <h3 class="entry-title">
           <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark">
             <?php the_title(); ?>
           </a>
         </h3>

          <?php if ( get_the_excerpt() ){ ?>
          <section class="excerpt post-excerpt">
              <?php //the_excerpt() ?>
              <?php echo wp_trim_words(get_the_excerpt(), 22); // https://developer.wordpress.org/reference/functions/wp_trim_words/?>
          </section>
          <?php ; }?>

         <nav class="more-link">
         <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="button button-more">
            Més info
            <span class="hide"><?php the_title(); ?></span>
           </a>
         </nav>

</article>