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

WordPress

Boris Kamp
Boris Kamp
16,660 Points

php add_post_type_support

Im stuck here, I wanna add one more custom post type to this function called 'finished' so it should remove the editor function from both the 'reviews' and 'finished' custom post types. I can't figure out how to add the second one without messing up my code.

add_action('init', 'init_remove_support',100);
function init_remove_support(){
    remove_post_type_support( 'reviews' , 'editor');
}

How do I solve this? Thanks!

1 Answer

Ben Falk
Ben Falk
3,167 Points

Assuming I am understanding you correctly... Rather than removing the support after the fact, perhaps a better approach would be to not create a custom post type that supports those things? I know when you declare a custom post type, you do have control over the capabilities of the type.

http://codex.wordpress.org/Function_Reference/register_post_type#Arguments (look for the "supports" argument)