How can i show post_class() within output loop?

I am trying to use show post_class() within $output loop.Though i tried it different way i failed.

Here is my codes

$output .= '<div ';
post_class('blog-list-vertical-content');
$output .= '" id=' . get_the_ID() . '>';

Read more here: How can i show post_class() within output loop?

Leave a Reply

Your email address will not be published. Required fields are marked *