wordpress get the_excerpt by post id

no comments
29 Nov 2017 12:40 am

In Current 4.9 or preview versions we cannot get the_excerpt or get_the_excerpt by post ID so here is a little bit hack code to get excerpt paragraph of post by postID with alternate code

$postDATA = get_post($postID);
$wordLength = 15;
echo wp_trim_words( strip_shortcodes($postDATA->post_content) ,$wordLength);

NOTE:Your Email Address will be not shown and please do not add spamming comments because here is REL="NOFOLLOW" on your links and comments also moderated shown.
<code>Put html css or any language code under this tag</code>