Title: Plugin causes forums to render above all html
Last modified: August 21, 2016

---

# Plugin causes forums to render above all html

 *  [Kate](https://wordpress.org/support/users/kwalshucnjgmailcom/)
 * (@kwalshucnjgmailcom)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/plugin-causes-forums-to-render-above-all-html/)
 * Running WordPress 3.8 with bbPress 2.5.1, caused forums HTML to render above 
   all other HTML (even my DOCTYPE declaration). Was running a custom theme, swapped
   to Twenty Ten. Same issue. Swapped again to Twenty Thirteen. Same issue. Had 
   to vote it as broken. 🙁
 * [http://wordpress.org/plugins/bbpress-protected-forums/](http://wordpress.org/plugins/bbpress-protected-forums/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Wesley](https://wordpress.org/support/users/wesleyenglish/)
 * (@wesleyenglish)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/plugin-causes-forums-to-render-above-all-html/#post-4437853)
 * I have the same problem. I found a workaround, but it’s not a 100%.
 *  Add a “break;” to bbpress-pf.php after line 34 so that the function looks like
   this:
 *     ```
       //Disallowed?
           foreach($current_user->roles as $role){
               if(in_array($role, $disallowed_roles)){
                   ob_start();
                   add_action( 'bbp_theme_after_topic_form', 'pf_stop_capture');
                   break;
               }
           }
       ```
   
 * Otherwise the action gets called too many times, messing up the session and leading
   to the page rendering out of order.
 * This is not a perfect workaround because it still causes the icons in the WordPress
   toolbar to not display. But otherwise it seems to solve the problem.
 *  [kmc4637](https://wordpress.org/support/users/kmc4637/)
 * (@kmc4637)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/plugin-causes-forums-to-render-above-all-html/#post-4437858)
 * Would be great if this were fixed. 🙁
 *  [kmc4637](https://wordpress.org/support/users/kmc4637/)
 * (@kmc4637)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/plugin-causes-forums-to-render-above-all-html/#post-4437860)
 * I think I found a workaround to the toolbar icons not displaying (or at least,
   it’s working for me). Add this code:
 * `wp_enqueue_style('dashicons-css', '/wp-includes/css/dashicons.min.css');`
 * to the pf_stop_capture method:
 *     ```
       function pf_stop_capture(){
           ob_get_clean();
           remove_action('bbp_theme_after_topic_form', 'pf_stop_capture');
           wp_enqueue_style('dashicons-css', '/wp-includes/css/dashicons.min.css');
       }
       ```
   
 *  [Wesley](https://wordpress.org/support/users/wesleyenglish/)
 * (@wesleyenglish)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/plugin-causes-forums-to-render-above-all-html/#post-4437861)
 * This worked for me, as well. Thank you!
 *  [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/plugin-causes-forums-to-render-above-all-html/#post-4437898)
 * [@wesley](https://wordpress.org/support/users/wesley/)
    this works for me here
   too. however, as i am allowing people to post even if they are not registered/
   logged in I added – just after //Disallowed ?
 *     ```
       if(!is_user_logged_in()){
       		ob_start();
       		add_action( 'bbp_theme_after_topic_form', 'pf_stop_capture');
       		return;
       	}
       ```
   
 * as i think the chances are that – if one want sto restrict topic creation – than
   this should also by default apply to non logged in users too i would have thought.
 * works for me anyway
 *  [bfrye26](https://wordpress.org/support/users/bfrye26/)
 * (@bfrye26)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/plugin-causes-forums-to-render-above-all-html/#post-4437902)
 * These changes worked perfectly! Someone really should fork this plugin off and
   implement these changes to the core code
 *  [pazis](https://wordpress.org/support/users/pazis/)
 * (@pazis)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-causes-forums-to-render-above-all-html/#post-4437911)
 * Thanks a lot! I had the same problem and it worked for me, too! 😀

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Plugin causes forums to render above all html’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bbpress-protected-forums_e8f1e4.svg)
 * [bbPress Protected Forums](https://wordpress.org/plugins/bbpress-protected-forums/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bbpress-protected-forums/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bbpress-protected-forums/)
 * [Active Topics](https://wordpress.org/support/plugin/bbpress-protected-forums/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bbpress-protected-forums/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bbpress-protected-forums/reviews/)

 * 7 replies
 * 6 participants
 * Last reply from: [pazis](https://wordpress.org/support/users/pazis/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-causes-forums-to-render-above-all-html/#post-4437911)
 * Status: not resolved