Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Jake White41,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...