Last active
December 15, 2015 22:09
-
-
Save zachary-russell/5331127 to your computer and use it in GitHub Desktop.
Add premise landing page membership support to custom post types
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 | |
add_action('init', 'add_premise_member_support'); | |
function add_premise_member_support() { | |
$post_type=cpt; //replace this with the name of your custom post type | |
add_post_type_support( $post_type, 'premise-member-access' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not quite. The variable has to be part of the function unless you call a global. Also missing a ; after the variable.
add_action('init', 'add_premise_member_support');
function add_premise_member_support() {
$post_type=cpt; //replace this with the name of your custom post type
add_post_type_support( $post_type, 'premise-member-access' );
}