Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

API to add content types / fields via theme or plugin #700

sc0ttkclark opened this Issue Oct 29, 2012 · 3 comments


None yet
2 participants

sc0ttkclark commented Oct 29, 2012

This api would be similar to register_post_type and related functions, but would differ from the pods_api()->save_pod() method, in which it would not save them to the DB, but only use them for the current page load.

Useful for enabling content types and fields across multiple sites but tied to a specific theme.

Use case: WP.com / WP VIP sites

@ghost ghost assigned sc0ttkclark Nov 1, 2012


sc0ttkclark commented Nov 27, 2012

New functions added in: ee576f3

pods_register_type( 'post_type', 'my_post_type', array( 'label' => 'My Post Type' ) );
pods_register_field( 'my_post_type', 'my_field', array( 'label' => 'My Field', 'type' => 'text' ) );

Both accept the standard save_pod / save_field parameters from PodsAPI

gmaggio commented Mar 22, 2013

I'm trying to set the labels for an existing Pod, specifically an Advanced Content Type. Using the method above I get 'Pod [my_pod] already exists' message. Any way to modify an already registered Pod?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment