Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Jake White
Jake White
41,730 Points

Best Option for Custom Post Type Plugin

I am working on a Wordpress plugin that creates a custom post type. The custom post type uses some of the standard meta fields, plus a few created for the post type. My question is what the best practice is for the single-$posttype.php.

I want to be mindful of the users current theme and don't want to break how they display their posts, so right now Im using a shortcode on each page to bring in the content needed, while still maintaining the theme's single.php styles. I could use the add_filter('single_template'), to give me more design control, but Im worried that this could cause huge issues with themes.

Is using a shortcode to put in the content needed the best solution or is there a better way of giving me more control of how the post looks, without destroying the user's post styes?

Hope that makes sense...