Created
February 24, 2020 17:51
-
-
Save ronalfy/bd3e2c0bf6405146ad66fd379a5b3d5a to your computer and use it in GitHub Desktop.
PMPro Limit Pages Add On for Protecting Posts
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 | |
function pmpro_lpv_add_my_post_types( $post_types ) { | |
$post_types[] = 'post'; | |
// Add pages to post type array to restrict Limit Post Views. | |
$post_types[] = 'page'; | |
// $post_types[] = 'custom-post-type'; | Example of how you can add more $post_types | |
return $post_types; | |
} | |
add_filter( 'pmprolpv_post_types', 'pmpro_lpv_add_my_post_types', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment