Title: Remove Plugins Default CSS Call
Last modified: May 16, 2017

---

# Remove Plugins Default CSS Call

 *  Resolved [dancingpony](https://wordpress.org/support/users/dancingpony/)
 * (@dancingpony)
 * [9 years ago](https://wordpress.org/support/topic/remove-plugins-default-css-call/)
 * We have our options set to use a very basic captcha, so the styles dictated in
   the included stylesheet aren’t even being used.
 * Is there a way to remove the stylesheet from the page so it doesn’t add an unnecessary
   call to another asset?

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

 *  [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [9 years ago](https://wordpress.org/support/topic/remove-plugins-default-css-call/#post-9148030)
 * Hi,
 * Thank you for contacting us!
 * Unfortunately, there is no chance to detect if the Captcha would be present on
   the page in advance, so we have to add captcha CSS styles anyway.
 * However, there is a way to remove it where it’s unnecessary.
    Please go to the
   plugin settings page, open “Custom code” tab, mark the “Activate” option in the“
   Editing bws-custom-code.css” section, and add the following code:
 *     ```
       function remove_captcha_styles() {
           $post_id = get_the_ID();
   
           /* your condition, describing where captcha styles shouldn't be added, for example if the post ID is not 1, 5 or 121: */
           if ( ! ( ! empty( $post_id ) && in_array( $post_id, array( 1, 5, 121 ) ) ) ) {
               remove_action( 'wp_enqueue_scripts', 'cptch_front_end_styles' );
           }
       }
       add_action( 'wp_enqueue_scripts', 'remove_captcha_styles', 1 );
       ```
   
 * Please let us know if everything is okay now.
 * Sincerely,
    BestWebSoft Support Team
 *  [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/remove-plugins-default-css-call/#post-9294463)
 * Hi,
 * Since there is no reply from you, we consider this topic as resolved. We hope
   you’ve found the solution. If you have any questions, please feel free to contact
   us via our Help Center – [https://support.bestwebsoft.com/](https://support.bestwebsoft.com/).

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

The topic ‘Remove Plugins Default CSS Call’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/captcha_92b6c9.svg)
 * [Captcha](https://wordpress.org/plugins/captcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/captcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/captcha/)
 * [Active Topics](https://wordpress.org/support/plugin/captcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/captcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/captcha/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)

 * 2 replies
 * 2 participants
 * Last reply from: [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/remove-plugins-default-css-call/#post-9294463)
 * Status: resolved