Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function create_blog_card($post) {
- $link = get_permalink($post->ID);
- $output = '<div id="post-'. $post->ID .'" class="col-md-4 recent-post text-center">';
- $output .= '<a href="'. $link .'">'. get_the_post_thumbnail($post->ID) .'</a>';
- $output .= '<div class="post-excerpt-content">';
- $output .= '<h4 class="blog-post-title"><a href="'. $link . '">'. $post->post_title .'</a></h4>';
- $output .= '<p>'. wp_trim_words( $post->post_content, 35, ' [...]' ) .'</p>';
- $output .= '</div>';
- $output .= '</div>';
- return $output;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement