This didnt work it returned an error
The below is all the code in the loop
while ( have_posts() ) : the_post();
$p_text = ‘<h2>’ . get_the_title() . ‘</h2><p>’ . get_the_excerpt() . ‘</p>’;
$p_img = get_post_thumbnail_id($post->ID);
calgavin_content_block($p_text, get_permalink($post->ID));