get_the_content
doesn’t apply all of the filters that the_content
runs before outputting the result. You can fix this by simply using:
<?php the_content(); ?>
in place of:
<?php echo $content; ?>
If you look at the source for the_content
, you’ll see the extra step it performs on what is returned from get_the_content
.