balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

excerpt-chat.php (530B)


      1 <?php
      2 /**
      3  * Show the appropriate content for the Chat post format.
      4  *
      5  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
      6  *
      7  * @package WordPress
      8  * @subpackage Twenty_Twenty_One
      9  * @since Twenty Twenty-One 1.0
     10  */
     11 
     12 // If there are paragraph blocks, print up to two.
     13 // Otherwise this is legacy content, so print the excerpt.
     14 if ( has_block( 'core/paragraph', get_the_content() ) ) {
     15 
     16 	twenty_twenty_one_print_first_instance_of_block( 'core/paragraph', get_the_content(), 2 );
     17 } else {
     18 
     19 	the_excerpt();
     20 }