function my_pmpro_posts_results($results) { //don't do anything in the admin if(is_admin()) return $results; if(!empty($results) && !is_single() && !is_page()) { $newresults = array(); foreach($results as $result) { if(pmpro_has_membership_access($result->ID)) { $newresults[] = $result; } } $results = $newresults; unset($newresults); } return $results; } add_filter('posts_results','my_pmpro_posts_results'); ?>
Warning: Cannot modify header information - headers already sent by (output started at /home/content/g/a/m/gameplan1/html/wp-content/themes/thesis_185/custom/custom_functions.php:142) in /home/content/g/a/m/gameplan1/html/wp-includes/pluggable.php on line 875