WordPress -Postauszug aus der 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;
?>
Lokesh003Coding