Skip to content

Instantly share code, notes, and snippets.

@zachary-russell
Last active December 15, 2015 22:09
Show Gist options
  • Save zachary-russell/5331127 to your computer and use it in GitHub Desktop.
Save zachary-russell/5331127 to your computer and use it in GitHub Desktop.
Add premise landing page membership support to custom post types
<?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' );
}
?>
@pmgllc
Copy link

pmgllc commented May 26, 2014

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' );
}

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