Answers for "wordpress get post excerpt"

PHP
0

wordpress echo the excerpt

<?php the_excerpt(); ?>
Posted by: Guest on November-25-2020
0

wordpress post excerpt from post id

<?php
$post = get_post( $post );
$excerpt = get_the_excerpt(); || ( $post->post_excerpt ) ? $post->post_excerpt : $post->post_content;
 
$excerpt = substr($excerpt, 0, 260);
$result = substr($excerpt, 0, strrpos($excerpt, ' '));
echo $result;
?>
Posted by: Guest on June-18-2021

Browse Popular Code Answers by Language