Forked from andrewlimaza/pmpro-add-post-type-to-series.php
Created
December 3, 2018 11:41
-
-
Save travislima/e3da6e42471394b4e8129571bd46627f to your computer and use it in GitHub Desktop.
Add a Custom Post Type for PMPro Series Add On
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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 ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/