Title: plugin doesn&#039;t work with P2
Last modified: August 21, 2016

---

# plugin doesn't work with P2

 *  Resolved [careb](https://wordpress.org/support/users/careb/)
 * (@careb)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/)
 * the plugin doesn’t hook into wp_head(); under P2
 * when editing the header.php file to put in the script and css links manually,
   the plugin still doesn’t work unless i kill the css behind P2. then the buttons
   show and work fine.
 * there’s probably too much going on in P2 to make it work as plugin.
 * i looked into adding your code to the theme directly … but there’s a lot going
   on in those files, i’d prefer a plugin.
 * [https://wordpress.org/plugins/basic-comment-quicktags/](https://wordpress.org/plugins/basic-comment-quicktags/)

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

 *  Plugin Author [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4579811)
 * It used to work on P2… I’m not surprised it doesn’t, since the tweaks there to
   add in their own comment quicktags probably butt heads.
 * I’ll see if I can force it back round :/
 *  Plugin Author [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4579828)
 * Okay it works on comments on individual pages (which I think I did on purpose
   so as not to slaughter the speed of a site). You want it to show up on the front
   page for comments only?
 *  Thread Starter [careb](https://wordpress.org/support/users/careb/)
 * (@careb)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4579853)
 * is that possible?
 * >  I’m not surprised it doesn’t, since the tweaks there to add in their own comment
   > quicktags probably butt heads.
 * maybe i should go nag Automatic about how to turn on their quicktags.
 *  Plugin Author [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4579857)
 * It MAY be possible. I recall having issues with CPU usage last time.
 * FWIW, Automatic’s headed towards [http://geto2.com/](http://geto2.com/) instead
   which does have quicktags working and built in, so this just may not be possible
   right now 🙁
 *  Thread Starter [careb](https://wordpress.org/support/users/careb/)
 * (@careb)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4580090)
 * update:
 * i’ve been able to get it to work with P2 by changing:
 *     ```
       if ( is_singular() && comments_open() && ( $options['comments'] != '0') && !is_null($options['comments']) ) {
                       $this->add_scripts();
                   }
       ```
   
 * to
 *     ```
       if ( comments_open() && ( $options['comments'] != '0') && !is_null($options['comments']) ) {
                       $this->add_scripts();
                   }
       ```
   
 * lines 88 and 102 need the same edit to load the script and the css.
 * another minor issue i encountered was with Akismet. on my multisite install, 
   if Akismet is deactivated, the plugin will not work even if it’s activated (locally
   or network wide) on the main site. the plugin will continue to work on any other
   blog it is enabled on, but not the main site.
 * something, i don’t know what, prevents the plugin from loading. if Akismet is
   activated, locally or network wide, the plugin loads and works fine with the 
   quicktags bar showing for comments AND the frontend post field (which was a nice,
   unexpected bonus).
 * the differences in code are – with Akismet on:
 *     ```
       </p>
       <p style="display: none;">
       <input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="63d5c0c54b" />
       </p>
       <input type="hidden" id="_wp_unfiltered_html_comment_disabled" name="_wp_unfiltered_html_comment_disabled" value="bb28b63bd0" />
       <script>
       (function(){if(window===window.parent){document.getElementById('_wp_unfiltered_html_comment_disabled').name='_wp_unfiltered_html_comment';}})();
       </script>
       <p style="display: none;">
       <input type="hidden" id="ak_js" name="ak_js" value="15"/>
       </p>
       </form>
       ```
   
 * with Akismet off:
 *     ```
       </p>
       <input type="hidden" id="_wp_unfiltered_html_comment_disabled" name="_wp_unfiltered_html_comment_disabled" value="bb28b63bd0" />
       <script>
       (function(){if(window===window.parent){document.getElementById('_wp_unfiltered_html_comment_disabled').name='_wp_unfiltered_html_comment';}})();
       </script>
       </form>
       ```
   
 *  Plugin Author [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4580091)
 * Is Akismet only a problem on the p2 blog? That’s really odd…
 * I’ll see about folding in the checks for p2 though.
 *  Plugin Author [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4580092)
 * Aha. The is_singular check is why.
 * Damn… Okay, so that’s in part because I didn’t WANT to load it on pages that 
   didn’t need it, so as to limit how much JS we’re loading per page. While it is
   pretty lightweight, calling JS like that on _every_ page load is not a great 
   idea.
 * If I do a check-only for P2s, then I’ll have the same problem with o2 (which 
   admittedly doesn’t need this plugin at all) or any theme that uses an in-page
   comment system like this.
 * I’m going to have to read up on how P2 puts in the comment/reply on each page
   and see if I can check for THAT existence instead of just grabbing the singular
   page.
 *  Thread Starter [careb](https://wordpress.org/support/users/careb/)
 * (@careb)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4580093)
 * dang. i fingered Akismet too soon.
 * today i got the plugin to not load on the main site regardless of whether Akismet
   was activated or not.
 * i can’t get it to work again. something … probably in P2 is preventing it from
   loading. it works if i switch to twentyfourteen.
 * it still works on all the subsites it’s enabled on _with P2_ though. (i’ve got
   a subfolders, not a subdomains install.)
 * this server is for a very small user group that will mostly want access from 
   the intranet. i don’t have to worry about resources that much.
 *  Plugin Author [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4580094)
 * > it still works on all the subsites it’s enabled on with P2 though. (i’ve got
   > a subfolders, not a subdomains install.)
 * So … just not the MAIN site? o.O What’s different about that one? Any weird plugins?
 * FWIW, two places to change:
 * [https://plugins.trac.wordpress.org/browser/basic-comment-quicktags/trunk/quicktags.php#L85](https://plugins.trac.wordpress.org/browser/basic-comment-quicktags/trunk/quicktags.php#L85)
 * [https://plugins.trac.wordpress.org/browser/basic-comment-quicktags/trunk/quicktags.php#L96](https://plugins.trac.wordpress.org/browser/basic-comment-quicktags/trunk/quicktags.php#L96)
 * Both of those need `is_singular() && comments_open()` changed to JUST `comments_open()`
 * You may even want to change the lines to this:
 *     ```
       if ( ($options['comments'] != '0') && !is_null($options['comments']) ) {
       ```
   
 *  Thread Starter [careb](https://wordpress.org/support/users/careb/)
 * (@careb)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4580095)
 * the main has site wide tags driving content from all the sub sites into it. when
   these posts arrive, they have the comments disabled (closed) which is disabling
   the plugin.
 * i changed this:
 *     ```
       if ( comments_open() )
       ```
   
 * to this:
 *     ```
       if ( comments_open() || is_main_site() )
       ```
   
 * which seems to be working.
 *  Plugin Author [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4580096)
 * >  they have the comments disabled (closed) which is disabling the plugin.
 * Hah, Damn you P2!
 * FWIW, O2 (the replacement for P2) doesn’t need this plugin. Comes with it built
   in.
 * Try doing is_front_page() instead of main site.

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

The topic ‘plugin doesn't work with P2’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/basic-comment-quicktags_dfc2c1.svg)
 * [Basic Comment Quicktags](https://wordpress.org/plugins/basic-comment-quicktags/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/basic-comment-quicktags/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/basic-comment-quicktags/)
 * [Active Topics](https://wordpress.org/support/plugin/basic-comment-quicktags/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/basic-comment-quicktags/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/basic-comment-quicktags/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-p2/#post-4580096)
 * Status: resolved