Last active
February 23, 2024 20:20
-
-
Save dparker1005/fe1fb6c69a9f60c34e927985b82e84eb to your computer and use it in GitHub Desktop.
Disable hiding PMPro pages from search.
This file contains 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 | |
/** | |
* Disable hiding PMPro pages from search. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
/** | |
* Disable hiding PMPro pages from search. | |
*/ | |
function my_remove_pmpro_search_filter_pmpro_pages() { | |
remove_filter( 'pre_get_posts', 'pmpro_search_filter_pmpro_pages' ); | |
} | |
add_action( 'init', 'my_remove_pmpro_search_filter_pmpro_pages', 9 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment