Guest User

Untitled

a guest
Feb 13th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. /*
  2. Only redirect away from single topic and single reply pages.
  3.  
  4. Add this code to a custom plugin.
  5. */
  6. function wp_maybe_disable_pmprobbp_check_forum() {
  7. global $post;
  8. if(function_exists('bbp_is_topic') && !bbp_is_topic($post->ID) && !bbp_is_reply($post->ID)) {
  9. remove_action( 'template_redirect', 'pmprobbp_check_forum' );
  10. remove_filter( 'pmpro_search_filter_post_types', 'pmprobb_pmpro_search_filter_post_types' );
  11. remove_filter( 'pre_get_posts', 'pmprobb_pre_get_posts' );
  12. }
  13. }
  14. add_action('template_redirect', 'wp_maybe_disable_pmprobbp_check_forum', 1);
Add Comment
Please, Sign In to add comment