Heads up! This blog post hasn't been updated in over 2 years. CodePen is an ever changing place, so if this post references features, you're probably better off checking the docs. Get in touch with support if you have further questions.
We now have a WordPress Plugin for self-hosted WordPress(.org) sites. It allows for a new Shortcode (
[codepen_embed]) used for Embedded Pens.
The primary reason for using it is if you use the “Visual” editor at all while creating/editing Posts/Pages. The Visual editor doesn’t dig HTML, but handles Shortcodes just fine. Since that is the default and a lot of people use and like it, this would be the way to go.
Beyond that, it allows for some theme control. Some people just like to abstract things like this and this is a good way to do that.
You can learn more about it in our documentation for the plugin.