0

A theme I use registers a custom post-type. Unfortunately its supports array misses an item, I would like to add ('thumbnail'). Now, I don't like to overwrite the post-types registration in the theme and instead would like to "extend" it (via my child-theme). Is this possible?

1 Answer 1

1

You want add_post_type_support. A usage example from the Codex:

add_action('init', 'my_custom_init');
function my_custom_init() {
    add_post_type_support( 'page', 'excerpt' );
}
1
  • 1
    It is better to hook into registered_post_type and check if the post type you want to change is really there. init might be too early, depending the registration details.
    – fuxia
    Oct 13, 2013 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.