Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save travislima/e3da6e42471394b4e8129571bd46627f to your computer and use it in GitHub Desktop.

Select an option

Save travislima/e3da6e42471394b4e8129571bd46627f to your computer and use it in GitHub Desktop.
Add a Custom Post Type for PMPro Series Add On
<?php
/**
* This allows PMPro Series to take new post types, such as a Custom Post Type.
* Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_add_post_type_to_series( $post_types ) {
$post_types[] = 'my_cpt_name';
return $post_types;
}
add_filter( 'pmpros_post_types', 'my_pmpro_add_post_type_to_series', 10, 1 );
@laurenhagan0306

Copy link
Copy Markdown

This recipe is included in the blog post on "How to add Custom Post Types (CPTs) to your dripped membership series content." at Paid Memberships Pro here: https://www.paidmembershipspro.com/add-custom-post-types-and-pages-to-your-dripped-membership-series-content/

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